performance


c++ - Is there a reason why not to use link-time optimization (LTO)?

I assume that by "production software" you mean software that you ship to the customers / goes into production. The answers at Why not always use compiler optimization? (kindly pointed out by Mankars... Read More


python - Are list-comprehensions and functional functions faster than "for loops"?

The following are rough guidelines and educated guesses based on experience. You should timeit or profile your concrete use case to get hard numbers, and those numbers may occasionally disagree with... Read More


c++ - vector or map, which one to use?

I presume you're comparing map<A, B> with vector<pair<A, B> >. Firstly, finding an item in a very small vector can easily be faster than the same thing in a map, because all the memory in a vector is... Read More


python - Why are some float < integer comparisons four times slower than others?

A comment in the Python source code for float objects acknowledges that: Comparison is pretty much a nightmare This is especially true when comparing a float to an integer, because, unlike floats,... Read More


reference - How to "return an object" in C++?

I don't want to return a copied value because it's inefficient Prove it. Look up RVO and NRVO, and in C++0x move-semantics. In most cases in C++03, an out parameter is just a good way to make your... Read More


WordPress MySQL Performance

Before concerning yourself with the machine, have you done a thorough audit of your WordPress install's plugins, templates, etc. yet? I have a client in the 30-40k/day range on a shared host, with a... Read More


performance - Should I use multiplication or division?

Python: time python -c 'for i in xrange(int(1e8)): t=12341234234.234 / 2.0' real 0m26.676s user 0m25.154s sys 0m0.076s time python -c 'for i in xrange(int(1e8)): t=12341234234.234 * 0.5' r... Read More


performance - Why is tuple faster than list in Python?

The reported "speed of construction" ratio only holds for constant tuples (ones whose items are expressed by literals). Observe carefully (and repeat on your machine -- you just need to type the comm... Read More


Hierarchical vs Flat Keyword Lists and Performance in Lightroom

Short answer: It can be, depending on what you'll do. Long answer: Usually, from database/storage point of view, the keywords engine is split in two (groups of) tables. Now I'll take in consideratio... Read More


mysql - MyISAM versus InnoDB

I have briefly discussed this question in a table so you can conclude whether to go with InnoDB or MyISAM. Here is a small overview of which db storage engine you should use in which situation: My... Read More