On Jan 5, 2010, at 9:20 PM, Alex Queiroz wrote:
Hallo,
On Tue, Sep 23, 2008 at 6:14 PM, Bradley Lucier <lucier@math.purdue.edu
wrote:
GCs are often very short, on the order of milliseconds, for example on a 2.0GHz G5:
[descartes:~/Desktop] lucier% gsi Gambit v4.2.8
(##gc-report-set! #t) (define a (time (expt 3 10000000)))
*** GC: 1 ms, 692K alloc, 386K heap, 82.0K live (21% 65712+18208) *** GC: 1 ms, 992K alloc, 386K heap, 88.0K live (23% 71920+18208) *** GC: 1 ms, 1.19M alloc, 1.27M heap, 94.8K live (7% 55584+41536) *** GC: 2 ms, 2.08M alloc, 2.22M heap, 163K live (7% 55456+111184) *** GC: 2 ms, 3.22M alloc, 4.05M heap, 253K live (6% 55392+204064) *** GC: 2 ms, 5.48M alloc, 6.86M heap, 435K live (6% 55328+389808) *** GC: 4 ms, 9.98M alloc, 14.2M heap, 797K live (5% 55264+761280) *** GC: 7 ms, 19.0M alloc, 27.2M heap, 1.49M live (5% 55200+1504224) *** GC: 12 ms, 36.9M alloc, 54.0M heap, 2.90M live (5% 55136+2990128) (time (expt 3 10000000)) 1165 ms real time 1096 ms cpu time (936 user, 160 system) 9 collections accounting for 33 ms real time (9 user, 23 system) 71837896 bytes allocated no minor faults no major faults
I know this is an oooold thread, but I just compiled Gambit-C
with Clang and wanted something to compare with. The time I got is roughly 1/3 of this:
(time (expt 3 10000000)) 480 ms real time 478 ms cpu time (418 user, 60 system) 15 collections accounting for 13 ms real time (6 user, 7 system) 71857592 bytes allocated 13810 minor faults no major faults
This is a 2.4GHz Core 2 Duo running Snow Leopard, so some of the improvement must be due to the CPU difference.
Using the latest version of gambit and Apple's standard compiler on Leopard:
[maureen-luciers-macbook-pro:~] lucier% gsi -v v4.5.3 20091128045012 i386-apple-darwin9.8.0 "./configure CC=gcc -m64 - march=nocona --enable-single-host --enable-multiple-versions --no- create --no-recursion" [maureen-luciers-macbook-pro:~] lucier% gcc -v Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable- checking -enable-werror --prefix=/usr --mandir=/share/man --enable- languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/ $/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/ lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic -- host=i686-apple-darwin9 --target=i686-apple-darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5493)
I get
(define a (time (expt 3 10000000)))
(time (expt 3 10000000)) 503 ms real time 501 ms cpu time (438 user, 63 system) 6 collections accounting for 9 ms real time (3 user, 6 system) 71793992 bytes allocated no minor faults no major faults
on a 2.26 GHz Core 2 Duo on a 13" Macbook Pro. So scaling CPU speed to your slightly faster machine, I get an estimated time of
(* 501 2.26 (/ 2.4))
471.77500000000003
on your machine, which is just about what you got. I'm not sure what difference, if any, clang makes to the performance of this code.
Brad