[erlang-questions] fast tuple sorting

Dmitry Kolesnikov dmkolesnikov@REDACTED
Fri May 30 17:15:45 CEST 2014


I need to sort a list of tuples {integer(), float()} within 6 ms. the lists:keysort(1, X) is not fast enough for me. I am able to meet the hard requirement only if the list size about 10K tuples. However, my application needs to sort lists of 50K tuples or so.

I doubt that any other sort algorithm implemented in Erlang would solve my issue. Parallel sort would not help at all because production system would run parallel requests of lists sorting. I am starting to think of offloading the sorting to NIF. 

Any thought?

Best Regards, 

More information about the erlang-questions mailing list