[erlang-questions] Speedy unsort:shuffle/1,2 ?

Richard O'Keefe <>
Fri May 28 00:57:09 CEST 2010


I think it may be worth pointing out that this is one of the standard
examples to show that there are things a language with smashable
arrays can do faster than one without them.

Testing is something Erlang programmers seem to believe it.
Random testing is a very useful tool.
It might be a good idea to move the core random number generator
in random: into C (at present random:uniform() is quite slow) and
perhaps even replace it by a better RNG.  At the same time, it
would be a good idea to provide

	random:list_permutation(List) -> List'
	random:tuple_permutation(Tuple) -> Tuple'

as _fast_ building blocks.



More information about the erlang-questions mailing list