[erlang-questions] On a positive Erlang performance note...

Edwin Fine erlang-questions_efine@REDACTED
Fri Nov 21 18:10:21 CET 2008


Ok, then, it's attached. I did a double check, and the HiPE-related speedup
was a bit less than 10x; it was 7-8x, in line with your previous
experiences. It's still a really good speedup (big difference between an
hour of run-time and 8 minutes!)

The really significant thing is the combination of HiPE and parallelism: a
29x speedup over sequential BEAM. If I had more processors ("only" 4), it
would be even better.  I'm sure you can find ways to improve the program; if
so, I'd appreciate seeing the changes to learn better Erlang.

Regards,
Edwin Fine.

PS Kostis, I see you have an email address in Greece. Do you perhaps know or
know of my friend Diomidis Spinellis from the U of Athens? He's a very
smart, great guy.

PPS I ran the program on an approx. 600MB ISO, using BEAM, HiPE, and
parallel HiPE. Results are below.

*13> c(charclass).                                           *
{ok,charclass}
14> charclass:bm("/home/efine/downloads/railslive-0.2.1.iso").
*** Completed run using classify_binary ***
File "/home/efine/downloads/railslive-0.2.1.iso" size is 616232960 bytes
Classified 616232960 characters
Breakdown:
[{'8bit',313770058},
 {alnum,145673634},
 {alpha,122172907},
 {ascsp,2129902},
 {blank,4380198},
 {cntrl,77553142},
 {digit,23500727},
 {lower,62169483},
 {print,224909760},
 {punct,77106224},
 {space,13574043},
 {upper,60003424}]
*Speed = 2577047 bytes/sec (0.38804092367925275 us/byte)*
ok
*15> c(charclass,[native]).                                    *
{ok,charclass}
16> charclass:bm("/home/efine/downloads/railslive-0.2.1.iso").
*** Completed run using classify_binary ***
File "/home/efine/downloads/railslive-0.2.1.iso" size is 616232960 bytes
Classified 616232960 characters
Breakdown:
[{'8bit',313770058},
 {alnum,145673634},
 {alpha,122172907},
 {ascsp,2129902},
 {blank,4380198},
 {cntrl,77553142},
 {digit,23500727},
 {lower,62169483},
 {print,224909760},
 {punct,77106224},
 {space,13574043},
 {upper,60003424}]
*Speed = 19187638 bytes/sec (0.05211688774323269 us/byte)*
ok
17> *charclass:bm_par("/home/efine/downloads/railslive-0.2.1.iso").*
*** Completed run using par_classify_binary ***
File "/home/efine/downloads/railslive-0.2.1.iso" size is 616232960 bytes
Classified 616232960 characters
Breakdown:
[{'8bit',313770058},
 {alnum,145673634},
 {alpha,122172907},
 {ascsp,2129902},
 {blank,4380198},
 {cntrl,77553142},
 {digit,23500727},
 {lower,62169483},
 {print,224909760},
 {punct,77106224},
 {space,13574043},
 {upper,60003424}]
*Speed = 75454793 bytes/sec (0.013252968487761512 us/byte)*

On Fri, Nov 21, 2008 at 8:21 AM, Kostis Sagonas <kostis@REDACTED> wrote:

> Mikael Pettersson wrote:
> > Edwin Fine writes:
> >  >
> >  > That's extremely close to linear and is pretty impressive. I found
> HiPE gave
> >  > about a 10x speedup over BEAM. The results are with HiPE and exclude
> the
> >  > time taken to load the file into a binary.
> >  >
> >  > Kudos to Erlang and HiPE.
> >
> > Thanks.
> >
> >  > PS In the unlikely event that someone wants the code, I will gladly
> post it
> >  > if asked.
> >
> > Please do. I'd like to include it in the benchmark section
> > of HiPE's compiler test suite.
> > The 10x speedup over BEAM really put a smile on my face :-)
>
> It put a big smile on my face too, but I am not so surprised.
>
> In programs manipulating binaries, we've often experienced such speedups
> (typically 8x) over BEAM when using HiPE, and judging from Edwin's post,
> this appears to be a binary-intensive program. (Of course I _will_ be
> very surprised if the speedup is due to some reason other than binaries.)
>
> But having the program is a good thing nonetheless.
>
> Kostis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081121/ecdf0655/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: charclass.erl
Type: text/x-erlang
Size: 8574 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081121/ecdf0655/attachment.bin>


More information about the erlang-questions mailing list