From: Timothy J. H. <tim...@ma...> - 2004-05-27 13:37:57
|
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--- |