[erlang-questions] widefinder update

Thomas Lindgren <>
Mon Oct 29 10:11:19 CET 2007


--- Steve Vinoski <> wrote:

> On 10/28/07, Anders Nygren <>
> wrote:
> >
> > On 10/28/07, Hynek Vychodil
> <> wrote:
> > > Hi Anders,
> > > I rewrote your code a little. I removed all
> remaining binary bindings
> > > and it is noticeable faster again. Try
> wf_pichi3.erl.
> > >
> >
> > Hynek
> > that was great, Your change brings my wfinder1_1 +
> wfbm4_ets1_1
> > down to
> > real    0m1.118s
> > user    0m1.640s
> > sys     0m0.368s
> > on my 1.66 GHz dual core laptop.
> 
> 
> And on the 8-core 2.33GHz Intel Xeon Linux box with
> 2 GB RAM, this version
> is extremely fast:
> 
> real 0m0.567s
> user 0m2.249s
> sys 0m0.956s

(I'll ignore the unexplained sys time below. That
makes the discussion a bit preliminary; perhaps the
derived results should be computed some other way.
Apply grain of salt appropriately.)

For those keeping track, the latest result is fully
2.7 times faster than the best previous version (which
was block read), and 17.3 times faster than the
initial version. The latest speedup is basically due
to doing less work. However, note that user time fell
by a somewhat greater ratio than real time, which
might mean parallelization overheads are becoming
visible.

Also, the user time of 2.249 seconds is now close to
the Ruby user time, which were 2.095s on the same
hardware, while the Erlang parallelization speedup
(user/real) on top of this is 3.95 out of 8. Comparing
the real times of Erlang (0.567s) and Ruby (2.21s), we
get about the same execution time speedup, 3.9. Not
too shabby, huh?

Is there anything more to be wrung out of this
program? Well, apart from further tuning, one can note
that Ruby had 0.1s sys time, while Erlang apparently
needs a bit more, 0.5-1.0s. Why?

Taking a wider view, it would also be very interesting
to see how to apply these lessons to more general
problems and/or libraries.

Best,
Thomas



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the erlang-questions mailing list