3 ms·
I don't agree; perhaps 80% of the time. For example, the algorithmic purist may insist on using an O(1) or at least O(log n) container for maps or sets, where
by barrkel 17y ago
I don't agree; perhaps 80% of the time.
For example, the algorithmic purist may insist on using an O(1) or at least O(log n) container for maps or sets, where in practice, if the container will never hold more than a handful of items, a linear search through an array may be faster - because of cache effects.
Similarly, an overemphasis of pure OO design can result in lots of fine-grained objects stored in the heap, with lots of edges needing to be traversed to accomplish productive work. If one isn't aware of how expensive following pointers can end up owing to cache effects, you can create designs that lose substantial chunks of performance in such a way that it's not obvious with e.g. a simple code-based profiler where the bottleneck is..
- nitrogen 17y agoThis seems to be how Qt4 is. It's a great API to work with, but unfortunately results in 50-call-deep stacks (not an exaggeration -- I have to set valgrind to --num-callers=50 to get reasonable stack traces) and a lot of latency. That plus bugs in the new QGraphicsScene API are making me consider switching to something lower level, like Clutter or my old friend OpenGL.