/quicksort-benchmarks

quicksort-benchmarks

Primary LanguageSwiftApache License 2.0Apache-2.0

Quicksort Benchmarks

Benchmark quicksorting 1 million 64-bit floats (found in the file unsorted.csv) and time how long the quicksort function specifically takes. This is not a terribly rigorous benchmark and shouldn't be taken very seriously. It's mainly to see how Roc's optimizations measure up against other languages that have first-class support for in-place mutation.

Some goals:

  1. Use a straightforward quicksort implementation - like one that might appear in a textbook, not a performance-tuned one.
  2. Only measure time spent in the quicksorting function itself, to eliminate differences due to VM startup times and such
  3. Read the numbers from a file, and process them as 64-bit floats, so in all languages we're working with 64-bit floats stored on the heap.
  4. Read the numbers from sorted.csv and ensure that the answer was computed correctly.