Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chris-martin/6110322 to your computer and use it in GitHub Desktop.
Save chris-martin/6110322 to your computer and use it in GitHub Desktop.

http://jazzy.id.au/default/2012/10/16/benchmarking_scala_against_java.html

You're comparing an in-place sorting algorithm to an out-of-place one. You can't just say that the "idiomatic scala" uses a different style for implementing the same algorithm. The third benchmark has a different method signature. You're comparing algorithms that solve different problems. I'm not sure that an out-of-place quicksort would be considered idiomatic in any context anyway. Especially since the data structure you're using is a cons list (which I think was a goofy choice for a benchmark against arrays), wouldn't the "idiomatic scala programmer" be much more apt to write a merge sort?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment