[erlang-questions] Erlang shows its slow face!

Jesper Louis Andersen <>
Mon Nov 15 22:28:22 CET 2010


On Mon, Nov 15, 2010 at 4:21 PM, Fred Hebert <> wrote:
> I think the first thing to do before optimizing is understanding how you use
> the data. In the case of Pythagorean triplets like these, the right question
> might as well be "how many triplets do I need? What values do I need to work
> with?"

Let me add:

Optimization is many things. One of the tenets are how easy it is to
change your implementation, facing new knowledge. If you look at some
of the optimized variants, it should be fairly obvious that many of
them provide impressive speedups (for large N) with very few changes
to the original code as soon as an observation has been made.

My experience is that C, C++ or Java tend to require much more work
for these iterations. It turns out there is more to fast code than
just having a language isomorphic to assembly :)

-- 
J.


More information about the erlang-questions mailing list