Use pre-created instances when comparing flag names

Review Request #113120 - Created Oct. 5, 2013 and submitted

Jan Kundrát
Use pre-created instances when comparing flag names

The goal here was to elliminate in-place construction of QString instances only
to be destroyed later on when they go out of scope. This change cuts the time
spent in the isMarkedAsRead when running the testFlagReSyncBenchmark test from
2.69% of the total runtime down to 0.57% (clang 3.3). It might be interesting to
see how forcing the comparison to *always* hapen *only* on QString::d would end
up :), but it's rather tricky because that's a private member, of course. That
said, soemthing along the lines of [1] (inspired by [2] which is inspired by
[3]) *might* actually work here.

Tests which attempted to use std::binary_search ended up rather poorly; it seems
that clang 3.3 was not happy enough to inilne the various std::advance and
iterator_traits calls.

github, branch atom-parsing-speedup
Commit Hook
Jan Kundrát
Review request changed

Status: Closed (submitted)