Our great sponsors
-
countwords
Playing with counting word frequencies (and performance) in various languages. (by unhammer)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I recently tried to implement quicksort on vectors in Haskell aiming to make it fast enough to be comparable to C++. If you're curious you can check out https://github.com/sergv/vector-sorting-benchmarks. After some time and research on what C++ actually does I reimplemented it in Haskell and the result managed to stay within reasonable % of C++. E.g. sorting 1000 arrays of 20000 8-byte integers on my machine takes 523ms in C++ (with ffi overhead) and 545ms in fastest Haskell algorithm with closest others taking around 650ms.
In addition to what's mentioned, the "default" libraries people use are often not the best-performing ones. E.g. Data.Vector.Hashtables is often much faster than Data.HashMap.Strict (which again is typically faster than Data.Map). And we find performance papercuts in common libraries that may simply be due to not enough people optimising for speed.
In addition to what's mentioned, the "default" libraries people use are often not the best-performing ones. E.g. Data.Vector.Hashtables is often much faster than Data.HashMap.Strict (which again is typically faster than Data.Map). And we find performance papercuts in common libraries that may simply be due to not enough people optimising for speed.