On 3/24/2019 1:20 PM, Phil Nguyen wrote:
With Racket 7.2, the following program takes >13 seconds to run on
Windows, and <7 seconds on Linux either on Virtualbox on the same
machine, or native Linux on another machine with slightly
lower-powered processor:
|
#lang racket/base(define (fact n)(if(zero?n)1(*n (fact (-n 1)(time
(void(fact 10)))
;Windowsnative,i7-7660U; cpu time:13610real time:13633gc
time:4459;Linuxon Virtualbox,i7-7660U; cpu time:6691real time:6706gc
time:1298;Linuxnative,i7-8500Y:; cpu time:6894real time:6882gc time:1129
|
While the difference is unlikely to matter in practice, given `fact 10` is
a very large number, I'm curious what accounts for this difference? Is it some
big-integer library that Racket relies on?
I haven't paid attention to it recently, but in early 6.x versions I
observed very large differences in bytecode compilation speeds ... on
the order of 5 to 10 times with Linux (even on VM) the clear winner.
See the discussion here:
https://groups.google.com/forum/#!searchin/racket-users/neuner$20linux%7Csort:date/racket-users/iisjAKujpFQ/GJxa-PhHXRoJ
Execution times for a linked executable or an application consisting of
pre-compiled .zo files appeared to be roughly equivalent. Similarly,
starting a linked executable appeared roughly equivalent, but Windows
was 2..3 times slower than Linux at starting "racket " [most
likely due to checking the .zo files].
Note however that I was not benchmarking but rather working on a rather
complicated web service, so I was judging execution speeds mainly from
timestamping in my application logs.
George
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.