[erlang-questions] Erlang doesn't suck

Edwin Fine <>
Wed Oct 1 21:42:00 CEST 2008


I have not measured it in this specific instance, so I may be wrong, but I
don't think you will get a net increase in performance from 64 bit code
(compared to 32 bits on the same processor). In almost every case that I can
think of where I have used both, the 32 bit code was on average faster and
(unsurprisingly) smaller. Where 64 bits won was when lots of memory was
needed and available for use. Maybe if the code had optimizations for the 64
bit processor which included some faster instructions that were specific to
the 64-bit mode, and a nice fat register set to avoid passing parameters on
the stack, it could be faster.

I am very curious: has anyone taken any performance measurements of
real-world applications in 32 bit vs 64 bit Erlang on the same processor
configuration?

As for compilation failures you are seeing, I would try setting the
following:

export LDFLAGS="-m64 $LDFLAGS"
export CFLAGS="-m64 $CFLAGS"

The LDFLAGS is needed so that the build doesn't try to link with 32-bit
objects.

On Wed, Oct 1, 2008 at 2:53 PM, Joel Reymont <> wrote:

>
> On Oct 1, 2008, at 5:42 PM, Paul Fisher wrote:
>
> > Which begs the question of whether you compile to native or not for
> > your benchmarking?  Not everything benefits, but we have some
> > modules that show significant gains from:
> >
> > -compile([native, {hipe,[o3]}, inline]).
>
>
> There's certainly an increase in throughput (request per second) with
> hipe, even under 32 bits.
>
> Is there a way to mass-hipe-compile all of OTP?
>
> Simulating gameplay with 3000 games...
> Waiting for games to end...
> ...
> =INFO REPORT==== 1-Oct-2008::18:15:35 ===
>     requests: 40041
>     bytes: 736492
>     requests_per_second: 1334
>     bytes_per_second: 24549
> 50 games finished
> ...
> 1250 games finished
> ...
> =INFO REPORT==== 1-Oct-2008::18:16:06 ===
>     requests: 48419
>     bytes: 543775
>     requests_per_second: 1611
>     bytes_per_second: 18100
> ...
> 3000 games finished
>
> =INFO REPORT==== 1-Oct-2008::18:16:35 ===
>     requests: 39604
>     bytes: 345976
>     requests_per_second: 1319
>     bytes_per_second: 11529
>
> Elapsed: 62.517129s, Average run time: 0.020839043 seconds
>
> Now I have to try to compile R12B4 in 64-bit mode....
>
>
> --
> wagerlabs.com
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081001/24029ac7/attachment.html>


More information about the erlang-questions mailing list