Quote (Minkomonster @ Oct 2 2014 01:17am)
This is exactly what I am talking about. You can do run-time analysis without scaring your students into thinking they did something wrong by requiring that their sorting algorithm "work" with an astronomically high set of data. You can teach the same concept with data orders of magnitude lower than that.
Since we are talking about sorts. I have no idea what sort ruby uses for it's default sort() method. It's incredibly fast, so fast that in order to get results in my tests I have to bump up the test data set to 100,000 numbers which it finishes with 0.008 seconds. Radix sort on the same data does 0.0730001. It must be a bucket type of sort implemented in C or something.
edit:: Yep just checked rubys sort is implemented in C located in array.c, although I have no idea what method they use for sorting.
This post was edited by AbDuCt on Oct 1 2014 11:27pm