By briannesbitt
via nesbot.com
Submitted: Feb 08 2012 / 11:26
The other day I decided to do some microbenchmarking across several different languages. I used an array of 1 M integers and applied the quicksort sorting algorithm as the test code and also included the native language sort routines where applicable.
I wrote the runner using Cake and Coffeescript which compiles to Javascript and runs on node.js. Cake is a very simple build system and is similar to make/rake, as you probably already guessed.
Each respective test will run the sort algorithm 5 times (some only 3 because they take so long already it doesn't matter) and the minimum execution time is printed. I ran each one a few times and took an eyeball average of those runs. I am not that interested in a +/- of a few milliseconds when sorting 1 M integers. I am way more interested in orders of magnitude.



Add your comment