From: Ken A. <kan...@bb...> - 2004-05-27 15:11:05
|
Yes, using generics which are built on reflection is about 3 times slower. However, it is a good way to bootstrap a simple Scheme. Maybe we could take your primitives and generate Primitives.java from it. Can you check in the Gabriel benchmarks so we can use them as a performance test? BTW, Henry Baker showed that some of the benchmarks can be rewritten so they become so fast they no longer become useful benchmarks. http://home.pipeline.com/~hbaker1/home.html At 09:37 AM 5/27/2004 -0400, Timothy John Hickey wrote: >Report on direct implementation of primitives in javadot... > >The jscheme/prims.scm approach still has a way to go before it is competitive with >our current approach. I ran the gabriel benchmarks on standard JScheme >(on a 1 GHZ PowerPC G4 Mac OSX 10.3.4) >and then ran it again after loading in jscheme/prims.scm > >It appears that the pure javadot implementation is about 3-5 times slower >(and there are still a few bugs! which cause FFT, Fprint and Fread not to work, >I'll isolate them and put them in jscheme/SchemeTests.scm...) > > > CPSTAK CTAK Dderiv Deriv Destructive Div-iter Div-rec >Mac G4/std 1839 26520 2682 1833 5407 >1834 1887 >Mac G4/prims 8162 134623 21427 22026 39038 5885 >5701 > > FFT Fprint Fread Puzzle TAK > TAKL TAKR >Mac G4/std 10712 116 480 241 1072 8584 >1162 >Mac G4/prims FAIL FAIL FAIL 650 6946 27842 >7381 > >Using the javadot notation seems to double the time for standard primitives (note (car x) is defined by x.first() in primitives.scm) >> (define L '(a b c d e f g)) >> (time (car L) 100000) ---> (a (422 msec) (357280 bytes)) >> (time (.first$ L) 100000)---> (a (869 msec) (357280 bytes)) > >also adding a lambda layer makes the time triple that of the regular primitive >> (define (mycar L) (.first$ L)) ---> (lambda mycar (L)...) >> (time (mycar L) 100000) ---> (a (1207 msec) (163008 bytes)) > >This provides an automatic slowdown of about 3. >Compilation could remove most of this slowdown if done well. > >---Tim--- > > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >_______________________________________________ >Jscheme-devel mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-devel |