Monday, January 10, 2011

Sorting Algorithms In Your Favorite Languages

I found this cool article about which sorting algorithms are used by the major development languages. It's an interesting read. During most development you don't actually need to care, but it's interesting to know. There are a few times where it actually matters though.

For example, if your real-time application requires something to run in O(n*log(n)), you can't rely on your language's built-in quick sort. If sorting is the bottle-neck in your code, and you know something about the input(say that the numbers are bounded by some number, k), then you can optimize that code by implementing a non-comparison model sorting algorithm, like counting sort (O(n+k)). Probably the most useful thing I learned in CS 241 is that if you know something about your input, you can usually do much better than the generic algorithms.

In other news, work is going really well. I am learning a lot about user interfaces and web development. It's a different and fun way to approach development. I'm enjoying the breadth of new technology I get to work with on a day-to-day basis.

No comments:

Post a Comment