HiPE compilation gives NINE times speed increase!
Mon Jan 17 11:55:26 CET 2005
Peter-Henry Mander writes:
> Scott has kindly run the tests as well, and the emerging picture isn't
> so much how much more efficient the HiPE native compiled code is, but
> rather why is the non-native compilation producing memory-hungry
> inefficient VM code?
I've run the test in various platforms (SPARC, x86, AMD64), all with much
more RAM than the test needs to run, and I fail to see a big difference
in the memory consumption when running BEAM vs. native code.
The speedup you get in this program is indeed more than average but is
not so surprising. We've put quite some effort in efficiently compiling
binaries to native code, the compiler optimizations that HiPE performs
are quite effective in such code, and we've experienced similar speedups
in some programs manipulating binaries. On the other hand try-catch has
nothing to do with the speedup; it is entirely due to HiPE's compilation
> My guess is the combined use of the recently updated try-catch statement
> and binaries allows for some of the HiPE team's work to really shine in
> this example. I found this out by chance, and I would be very interested
> if members of the HiPE team can offer programming guidelines to maximise
> optimisation in other situations.
I'm not sure what advise to give other than "In programs manipulating
binaries, if you want speed use HiPE".
More information about the erlang-questions