When faster is actually slower

This is a follow-up to my post on code optimization. Today I did some experimenting with hashes and binary-search-trees, specifically playing with QHash and QMap in C++. According to the Qt containers algorithmic complexity documentation, QHash provides “significantly faster lookups” than QMap. Your intuition may confirm this, because you’ve heard that QHash uses a constant-time […]

How to optimize your code

Disclaimer 1: This post was influenced heavily by my good friend, co-worker, and Haskell hacker Evan. Disclaimer 2: Unless otherwise noted, I am completely making up terms in this article. I pulled them right out of the ether. Don’t expect to find industry conventions that agree with me. Bob is a fictitious developer on my […]