3 ms·
6:47 minutes to sort 2k items. We've come a long way. Python isn't even the fastest of languages $ time python3.6 -c "import random; l = random.choices(ran
by ericfrederich 9y ago
6:47 minutes to sort 2k items.
We've come a long way. Python isn't even the fastest of languages
$ time python3.6 -c "import random; l = random.choices(range(1_000_000), k=2_000); l.sort()"
real 0m0.033s
... and this also takes into account creating the 2k random ints.
- kccqzy 9y agoAnd Python doesn’t even use quicksort any more.