[erlang-questions] Implemented Poisson and Exponential Distribution

John-Paul Bader hukl@REDACTED
Mon Jun 1 11:16:27 CEST 2015

Hey Jay,

thank your for the response. I know that append and nth are not optimal 
however I could not avoid it all the time and the lists at hand are 
rather short.

I've profiled the code and it seems fairly efficient. I've taken a 
screenshot of the qcachegrind profile:


~ John

Jay Nelson wrote:
> Your slowest things are going to be lists:append and lists:nth.
> You should use lists:sublist instead of a filter with lists:nth.
> And see if there is any way to avoid appending to the end of
> a list, or walking to a specific position in the other cases.
> jay
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list