surprising result with hipe compilation

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Wed Nov 5 17:51:15 CET 2003


From: Kostis Sagonas [mailto:kostis@REDACTED]

>Ulf, I have looked at your program and have trouble obtaining
> the behaviour that you are observing.  When compiled to native
> code, the code is consistently 20-40 % faster than BEAM (and
> arguably more than that).

This is interesting.

> Some more comments:
>   - The benchmark reads data from a file which is handled as a stream
>     Performing I/O can be give a big flactuation in times.  Ideally,
>     the benchmark should be re-written so that the data is read once
>     from the file (converted to a list or binary), and the time to
>     process the data is reported.

True. I decided not to do that, since the measured differences
were large enough that they couldn't be blamed on file.erl.
Interestingly, your figures are equally consistent, but in the
opposite direction.

>   - timer:tc is NOT the best possible way to measure time;
>     ideally, some more accurate time measurements should be used.

I think timer:tc is Ok, as long as the job is significantly large,
or one runs enough iterations. In this case, I wasn't really 
interested in any differences smaller than, say, 20%.

I will pretend that this didn't happen for now, unless you want
to come visiting and perform your own measurements on my particular
machine.  ;)

/Uffe



More information about the erlang-questions mailing list