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!) <br>
<br>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.<br>
<br>Regards,<br>Edwin Fine.<br><br>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.<br><br>PPS I ran the program on an approx. 600MB ISO, using BEAM, HiPE, and parallel HiPE. Results are below.<br>
<br><b>13> c(charclass). </b><br>{ok,charclass}<br>14> charclass:bm("/home/efine/downloads/railslive-0.2.1.iso").<br>*** Completed run using classify_binary ***<br>
File "/home/efine/downloads/railslive-0.2.1.iso" size is 616232960 bytes<br>Classified 616232960 characters<br>Breakdown:<br>[{'8bit',313770058},<br> {alnum,145673634},<br> {alpha,122172907},<br> {ascsp,2129902},<br>
{blank,4380198},<br> {cntrl,77553142},<br> {digit,23500727},<br> {lower,62169483},<br> {print,224909760},<br> {punct,77106224},<br> {space,13574043},<br> {upper,60003424}]<br><b>Speed = 2577047 bytes/sec (0.38804092367925275 us/byte)</b><br>
ok<br><b>15> c(charclass,[native]). </b><br>{ok,charclass}<br>16> charclass:bm("/home/efine/downloads/railslive-0.2.1.iso").<br>*** Completed run using classify_binary ***<br>
File "/home/efine/downloads/railslive-0.2.1.iso" size is 616232960 bytes<br>Classified 616232960 characters<br>Breakdown:<br>[{'8bit',313770058},<br> {alnum,145673634},<br> {alpha,122172907},<br> {ascsp,2129902},<br>
{blank,4380198},<br> {cntrl,77553142},<br> {digit,23500727},<br> {lower,62169483},<br> {print,224909760},<br> {punct,77106224},<br> {space,13574043},<br> {upper,60003424}]<br><b>Speed = 19187638 bytes/sec (0.05211688774323269 us/byte)</b><br>
ok<br>17> <b>charclass:bm_par("/home/efine/downloads/railslive-0.2.1.iso").</b><br>*** Completed run using par_classify_binary ***<br>File "/home/efine/downloads/railslive-0.2.1.iso" size is 616232960 bytes<br>
Classified 616232960 characters<br>Breakdown:<br>[{'8bit',313770058},<br> {alnum,145673634},<br> {alpha,122172907},<br> {ascsp,2129902},<br> {blank,4380198},<br> {cntrl,77553142},<br> {digit,23500727},<br> {lower,62169483},<br>
{print,224909760},<br> {punct,77106224},<br> {space,13574043},<br> {upper,60003424}]<br><b>Speed = 75454793 bytes/sec (0.013252968487761512 us/byte)</b><br><br><div class="gmail_quote">On Fri, Nov 21, 2008 at 8:21 AM, Kostis Sagonas <span dir="ltr"><<a href="mailto:kostis@cs.ntua.gr">kostis@cs.ntua.gr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Mikael Pettersson wrote:<br>
<div class="Ih2E3d">> Edwin Fine writes:<br>
> ><br>
> > That's extremely close to linear and is pretty impressive. I found HiPE gave<br>
> > about a 10x speedup over BEAM. The results are with HiPE and exclude the<br>
> > time taken to load the file into a binary.<br>
> ><br>
> > Kudos to Erlang and HiPE.<br>
><br>
> Thanks.<br>
><br>
</div><div class="Ih2E3d">> > PS In the unlikely event that someone wants the code, I will gladly post it<br>
> > if asked.<br>
><br>
> Please do. I'd like to include it in the benchmark section<br>
> of HiPE's compiler test suite.<br>
> The 10x speedup over BEAM really put a smile on my face :-)<br>
<br>
</div>It put a big smile on my face too, but I am not so surprised.<br>
<br>
In programs manipulating binaries, we've often experienced such speedups<br>
(typically 8x) over BEAM when using HiPE, and judging from Edwin's post,<br>
this appears to be a binary-intensive program. (Of course I _will_ be<br>
very surprised if the speedup is due to some reason other than binaries.)<br>
<br>
But having the program is a good thing nonetheless.<br>
<font color="#888888"><br>
Kostis<br>
<br>
</font></blockquote></div><br>