[erlang-questions] Erlang shows its slow face!

Edmond Begumisa <>
Mon Nov 15 16:52:57 CET 2010


On Tue, 16 Nov 2010 02:21:44 +1100, Fred Hebert <> wrote:

>
> If 90% of your calls fall in the same range, you might as well just cache
> the results and speed up 90% of the computations. No optimization  
> required.
> Then to reduce the overhead of the rest and maybe make the whole set of
> queries more predictable, you could use Morgen's algorithm with a static  
> or
> a cached sieve table/incorporated primes for the edge cases, or allow the
> algorithm to resume from the one you stored, etc.


I thought about doing something like that. I tried to write some code my  
side with using an ets table but at the end of the day got no speed ups  
coz ets:insert had to be called as I populated the cache. I suspect it  
might be that the table had to keep growing. I haven't used ets much -- is  
there a way of creating an empty table of certain size in one go?

- Edmond -

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the erlang-questions mailing list