4 ms·
C++'s template-based sorting mechanisms allow for the same optimization without manually special-casing anything. (The compiler "integrates everything", to quo
by bigfoot 14y ago
C++'s template-based sorting mechanisms allow for the same optimization without manually special-casing anything. (The compiler "integrates everything", to quote the author, out of the box.) C++ port of Postgresql, anyone?
- viraptor 14y agoOnly if you actually can special case it automatically during compilation. It could still require a few tricks if your comparison comes from a user-defined query. At a minimum it would have to be something like: figure out which column type are you using, figure out what basic type does it map to, use that type in the template.
- obtu 14y agoPostgreSQL is extensible enough that runtime specialisation would be best, I think. A JIT compiler, or a compiled type-safe multi-stage[1] programming language like MetaOCaml, would give the best performance. [1] http://www.cs.rice.edu/~taha/MSP/ http://www.cs.rice.edu/~taha/MSP/
- ibotty 14y agoor what about a java port? it's as feasible as a c++ port.