Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Sorting improvements in PostgreSQL 9.2: the case for micro-optimisation (pgeoghegan.blogspot.no)
41 points by martinp on Aug 2, 2012 | hide | past | favorite | 4 comments


Dupe of http://news.ycombinator.com/item?id=4327654 (thanks to non-canonical URL).


This submission's title (taken from the blog post) is more interesting.


Incidentally, this is the same reason why sorting in C++ using std::sort is much faster than qsort[1]. Basically, std::sort, which is templated, lets the compiler do the same specialization and inlining that this article talks about.

[1] http://radiospiel.org/sorting-in-c-3-times-faster-than-c


(Reposting the comment I had left on the other version of this article:)

PostgreSQL should really be using a radix sort for these data types, not a quick sort (however "optimized").




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: