Ok_Specific_7749@alien.topB to Lisp@communick.newsEnglish · 1 year agoFibbonaci of 39 speed test.message-squaremessage-square16fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1message-squareFibbonaci of 39 speed test.Ok_Specific_7749@alien.topB to Lisp@communick.newsEnglish · 1 year agomessage-square16fedilinkfile-text
minus-squaremfreddit@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoYou didn’t say on which machine you did your measurements… Here’s Gambit on a 5 year old intel based machine achieving 0.148 seconds: $ ./configure --enable-single-host --enable-march=native CC=gcc-9 ; make -j8 ; sudo make install ... $ gsc -exe fib.scm $ ./fib (time (fib 39)) 0.147854 secs real time 0.147816 secs cpu time (0.147732 user, 0.000084 system) no collections 64 bytes allocated 3 minor faults no major faults 63245986 $ sysctl -n machdep.cpu.brand_string Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz $ cat fib.scm (declare (standard-bindings) (fixnum) (not safe) (block) (not interrupts-enabled) (inlining-limit 1000) ) (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (println (time (fib 39)))
You didn’t say on which machine you did your measurements… Here’s Gambit on a 5 year old intel based machine achieving 0.148 seconds:
$ ./configure --enable-single-host --enable-march=native CC=gcc-9 ; make -j8 ; sudo make install ... $ gsc -exe fib.scm $ ./fib (time (fib 39)) 0.147854 secs real time 0.147816 secs cpu time (0.147732 user, 0.000084 system) no collections 64 bytes allocated 3 minor faults no major faults 63245986 $ sysctl -n machdep.cpu.brand_string Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz $ cat fib.scm (declare (standard-bindings) (fixnum) (not safe) (block) (not interrupts-enabled) (inlining-limit 1000) ) (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (println (time (fib 39)))