1. Just Faster
- Posted by xanax at bellsouth.net Dec 11, 2002
- 449 views
Just out of curiosity, anyone want to test the speed of these routines against the built-in routines Euphoria has. constant xlstrlen = define_c_func(kernel32,"lstrlen",{C_POINTER},C_INT) ,xCopyMemory = define_c_proc(kernel32,"RtlMoveMemory",{C_POINTER,C_POINTER,C_LONG}) ,xFillMemory = define_c_proc(kernel32,"RtlFillMemory",{C_LONG, C_LONG, C_INT}) global procedure memCopy(atom dest, atom from, atom size) c_proc(xCopyMemory,{dest, from, size}) end procedure global procedure memSet(atom dest, atom len, integer fill) c_proc(xFillMemory,{dest, fill, len}) end procedure global function peek_zstring(atom lpzString) return peek({lpzString,c_func(xlstrlen,{lpzString})}) end function I would suggest that version 2.4 get rid of the console mode for windows and use API directly because obviously the guys at Microsoft have teaked these particular API's for max speed....hint to Rob. Oh yeah, Im working on getting peek, poke and allocate_string to be much,much faster. guess you could say that these will obviously be part of my ESP contributions. Xanax
2. Re: Just Faster
- Posted by acran at readout.fsnet.co.uk Dec 12, 2002
- 444 views
Hello Xanax, What are the results of the benchmarks you have made? These routines are Windows based as well Yes? I assuming this from the kernel32 and xCopyMemory references. While no one likes inefficent code there are always trade offs. For example (on a personal preference basis) code that works unmodified on different platforms and/or hardware is worth more to me because I consider porting it to other environments. Always write for your target audience but bear in mind you may have just created a "smash hit" and everyone on all those "unfashionable types of computer" will want to run your software and, if so, you'll be glad you put the platform specific stuff into one Euphoria include file Rapidly prototype, robustly build for the future. Here endeth the ramble. Best regards, Andy Cranston. At 06:26 PM 12/11/02 -0500, you wrote: > >Just out of curiosity, anyone want to test the speed of these routines >against the built-in routines Euphoria has. > >constant > xlstrlen = define_c_func(kernel32,"lstrlen",{C_POINTER},C_INT) > ,xCopyMemory = define_c_proc(kernel32,"RtlMoveMemory",{C_POINTER,C_POINTER,C_LONG}) > ,xFillMemory = define_c_proc(kernel32,"RtlFillMemory",{C_LONG, C_LONG, C_INT}) > >global procedure memCopy(atom dest, atom from, atom size) > c_proc(xCopyMemory,{dest, from, size}) >end procedure > >global procedure memSet(atom dest, atom len, integer fill) > c_proc(xFillMemory,{dest, fill, len}) >end procedure > >global function peek_zstring(atom lpzString) > return peek({lpzString,c_func(xlstrlen,{lpzString})}) >end function > >I would suggest that version 2.4 get rid of the console mode for windows >and use API directly because obviously the guys at Microsoft have teaked >these particular API's for max speed....hint to Rob. > >Oh yeah, Im working on getting peek, poke and allocate_string to be much,much faster. >guess you could say that these will obviously be part of my ESP contributions. > >Xanax > > > >
3. Re: Just Faster
- Posted by xanax at bellsouth.net Dec 12, 2002
- 440 views
Eventually, code will run on all machines anyway. Take "Wine" for instance. Xanax ----- Original Message ----- From: <acran at readout.fsnet.co.uk> To: "EUforum" <EUforum at topica.com> Subject: Re: Just Faster : : Hello Xanax, : : What are the results of the benchmarks you have made? : : These routines are Windows based as well Yes? I assuming this from the : kernel32 and xCopyMemory references. : : While no one likes inefficent code there are always trade offs. For : example (on a personal preference basis) code that works unmodified on : different platforms and/or hardware is worth more to me because I consider : porting it to other environments. : : Always write for your target audience but bear in mind you may have just : created a "smash hit" and everyone on all those "unfashionable types of : computer" will want to run your software and, if so, you'll be glad you put : the platform specific stuff into one Euphoria include file : : Rapidly prototype, robustly build for the future. : : Here endeth the ramble. : : Best regards, : : Andy Cranston. : : At 06:26 PM 12/11/02 -0500, you wrote: : > : >Just out of curiosity, anyone want to test the speed of these routines : >against the built-in routines Euphoria has. : > : >constant : > xlstrlen = define_c_func(kernel32,"lstrlen",{C_POINTER},C_INT) : > ,xCopyMemory = : define_c_proc(kernel32,"RtlMoveMemory",{C_POINTER,C_POINTER,C_LONG}) : > ,xFillMemory = define_c_proc(kernel32,"RtlFillMemory",{C_LONG, C_LONG, : C_INT}) : > : >global procedure memCopy(atom dest, atom from, atom size) : > c_proc(xCopyMemory,{dest, from, size}) : >end procedure : > : >global procedure memSet(atom dest, atom len, integer fill) : > c_proc(xFillMemory,{dest, fill, len}) : >end procedure : > : >global function peek_zstring(atom lpzString) : > return peek({lpzString,c_func(xlstrlen,{lpzString})}) : >end function : > : >I would suggest that version 2.4 get rid of the console mode for windows : >and use API directly because obviously the guys at Microsoft have teaked : >these particular API's for max speed....hint to Rob. : > : >Oh yeah, Im working on getting peek, poke and allocate_string to be : much,much faster. : >guess you could say that these will obviously be part of my ESP : contributions. : > : >Xanax : > : > : > : > : : : :
4. Re: Just Faster
- Posted by jbrown1050 at hotpop.com Dec 12, 2002
- 426 views
On Wed, Dec 11, 2002 at 09:21:38PM -0500, xanax at bellsouth.net wrote: > > Eventually, code will run on all machines anyway. > > Take "Wine" for instance. > > Xanax Tell me .. how do I wrap up Wine/Winelib so I can use the code under Linux and also native Linux calls at the same time! And how is Wine faster? Wine is good when a program is only for Windows, but its better to have Xp (Xp == cross-platform btw) in mind from the start. However, in this case, Xanax (Euman) has a solution for a Window-related problem, so it doesn't really apply to other platforms (at least not directly anyways). jbrown > > ----- Original Message ----- > From: <acran at readout.fsnet.co.uk> > To: "EUforum" <EUforum at topica.com> > Sent: Wednesday, December 11, 2002 8:22 PM > Subject: Re: Just Faster > > > : > : Hello Xanax, > : > : What are the results of the benchmarks you have made? > : > : These routines are Windows based as well Yes? I assuming this from the > : kernel32 and xCopyMemory references. > : > : While no one likes inefficent code there are always trade offs. For > : example (on a personal preference basis) code that works unmodified on > : different platforms and/or hardware is worth more to me because I consider > : porting it to other environments. > : > : Always write for your target audience but bear in mind you may have just > : created a "smash hit" and everyone on all those "unfashionable types of > : computer" will want to run your software and, if so, you'll be glad you put > : the platform specific stuff into one Euphoria include file > : > : Rapidly prototype, robustly build for the future. > : > : Here endeth the ramble. > : > : Best regards, > : > : Andy Cranston. > : > : At 06:26 PM 12/11/02 -0500, you wrote: > : > > : >Just out of curiosity, anyone want to test the speed of these routines > : >against the built-in routines Euphoria has. > : > > : >constant > : > xlstrlen = define_c_func(kernel32,"lstrlen",{C_POINTER},C_INT) > : > ,xCopyMemory = > : define_c_proc(kernel32,"RtlMoveMemory",{C_POINTER,C_POINTER,C_LONG}) > : > ,xFillMemory = define_c_proc(kernel32,"RtlFillMemory",{C_LONG, C_LONG, > : C_INT}) > : > > : >global procedure memCopy(atom dest, atom from, atom size) > : > c_proc(xCopyMemory,{dest, from, size}) > : >end procedure > : > > : >global procedure memSet(atom dest, atom len, integer fill) > : > c_proc(xFillMemory,{dest, fill, len}) > : >end procedure > : > > : >global function peek_zstring(atom lpzString) > : > return peek({lpzString,c_func(xlstrlen,{lpzString})}) > : >end function > : > > : >I would suggest that version 2.4 get rid of the console mode for windows > : >and use API directly because obviously the guys at Microsoft have teaked > : >these particular API's for max speed....hint to Rob. > : > > : >Oh yeah, Im working on getting peek, poke and allocate_string to be > : much,much faster. > : >guess you could say that these will obviously be part of my ESP > : contributions. > : > > : >Xanax > : > > : > > : > > : > > : > : > : > : > > >
5. Re: Just Faster
- Posted by xanax at bellsouth.net Dec 12, 2002
- 447 views
or, LinWin would be another that I think uses Wine anyways... Xanax ----- Original Message ----- From: <xanax at bellsouth.net> : : Eventually, code will run on all machines anyway. : : Take "Wine" for instance. : : Xanax : : ----- Original Message ----- : From: <acran at readout.fsnet.co.uk> : To: "EUforum" <EUforum at topica.com> : Sent: Wednesday, December 11, 2002 8:22 PM : Subject: Re: Just Faster : : : : : : Hello Xanax, : : : : What are the results of the benchmarks you have made? : : : : These routines are Windows based as well Yes? I assuming this from the : : kernel32 and xCopyMemory references. : : : : While no one likes inefficent code there are always trade offs. For : : example (on a personal preference basis) code that works unmodified on : : different platforms and/or hardware is worth more to me because I consider : : porting it to other environments. : : : : Always write for your target audience but bear in mind you may have just : : created a "smash hit" and everyone on all those "unfashionable types of : : computer" will want to run your software and, if so, you'll be glad you put : : the platform specific stuff into one Euphoria include file : : : : Rapidly prototype, robustly build for the future. : : : : Here endeth the ramble. : : : : Best regards, : : : : Andy Cranston.
6. Re: Just Faster
- Posted by jbrown1050 at hotpop.com Dec 12, 2002
- 443 views
On Wed, Dec 11, 2002 at 09:39:38PM -0500, xanax at bellsouth.net wrote: > > or, LinWin would be another that I think uses Wine anyways... > > Xanax Don't know about that. If you're thinking about Win4Lin, then no, if you're thinking about Lindows, then yes. Win4Lin is a program which uses virtualization to run the Windows OS under Linunx, (only Linux as it requires linux kernel patches) Lindows is a Linux+Wine OS which attempts to provide for a cheap (perhaps free and open-source?) alternative to MS Windows. jbrown > > ----- Original Message ----- > From: <xanax at bellsouth.net> > : > : Eventually, code will run on all machines anyway. > : > : Take "Wine" for instance. > : > : Xanax > : > : ----- Original Message ----- > : From: <acran at readout.fsnet.co.uk> > : To: "EUforum" <EUforum at topica.com> > : Sent: Wednesday, December 11, 2002 8:22 PM > : Subject: Re: Just Faster > : > : > : : > : : Hello Xanax, > : : > : : What are the results of the benchmarks you have made? > : : > : : These routines are Windows based as well Yes? I assuming this from the > : : kernel32 and xCopyMemory references. > : : > : : While no one likes inefficent code there are always trade offs. For > : : example (on a personal preference basis) code that works unmodified on > : : different platforms and/or hardware is worth more to me because I consider > : : porting it to other environments. > : : > : : Always write for your target audience but bear in mind you may have just > : : created a "smash hit" and everyone on all those "unfashionable types of > : : computer" will want to run your software and, if so, you'll be glad you > put > : : the platform specific stuff into one Euphoria include file > : : > : : Rapidly prototype, robustly build for the future. > : : > : : Here endeth the ramble. > : : > : : Best regards, > : : > : : Andy Cranston. > > >