speed of 32 bit versus 64 installations
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
Consider the following program:
http://codeforces.com/contest/498/submission/9305810
I'm running it on this input:
100000 100000 100000 100000 100000 100000 100000
I'm testing it on three machines:
A: 2008 macbook pro
2.4GHz Intel Core 2 Duo
running ocaml 4.01.0, in 64-bits
B: An ubuntu Desktop. /proc/cpuinfo gives:
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz
running ocaml 4.01.0, in 32-bits
C: A very new high-powered machine running wndows server.
(I don't have the exact details. This is the machine running on
the codeforces server.)
running ocaml 4.00.1, in 32-bits
Here are the results:
A: 1.08 seconds
B: 2.95 seconds
C: over 3 seconds
I believe that machines B and C are newer and at least as fast as
machine A. Yet machine A solves this problem three times faster. The
conclusion is that the 64 bit installation of ocaml is MUCH faster (at
least three times as fast) as the 32 bit installation. (On this
program anyway.)
Which leads to the question: Is there a precompiled package to install
the 64 bit version on Ubuntu? On Windows? It seems kind of important.
Another question. The ocaml version on try.ocamlpro.com has 32-bit
integers. max_int is 2147483647. I've never seen a release of ocaml
with 32 bit integers. Normally it is 31 bits or 63 bits. What gives?
Thanks.
Danny Sleator