From: Timothy J. H. <ti...@cs...> - 2004-05-27 15:58:09
|
On May 27, 2004, at 11:10 AM, Ken Anderson wrote: > 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. Thats an interesting idea. One approach is to jsint.Compile it to create Primitives.java which can then be .load'ed in an environment.... > > Can you check in the Gabriel benchmarks so we can use them as a > performance test? I've checked them in .. you can run the benchmarks using the (runall) command in using/gabriel/runbenchmark.sch as follows > >> tim% java -jar lib/jscheme.jar using/gabriel/runbenchmark.sch >> '(runall)' >> >> CPSTAK::(2689 msec) >> CTAK::(29928 msec) >> Dderiv::(2689 msec) >> Deriv::(1840 msec) >> Destructive::(5306 msec) >> Div-iter::(1847 msec) >> Div-rec::(1900 msec) >> FFT::(11777 msec) >> Fprint::(137 msec) >> Fread::(335 msec) >> Puzzle:: >> Success in 13 trials.(207 msec) >> TAK::(1087 msec) >> TAKL::(9117 msec) >> TAKR::(1193 msec) >> > We should write something which computes a total time so we can get a single number measure of how performance changes when a change is made..... > > 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 Maybe its time to start building a Scheme benchmark set! We could start with the Great Programming Language Shootout... ---Tim--- > > 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 > |