common: Make frequently called util methods more efficient
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 3 Sep 2017 23:04:25 +0000 (01:04 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 3 Sep 2017 23:20:52 +0000 (01:20 +0200)
Remove unnecessary temporary allocations and string copies in the
various methods in util.*, and avoid calling API functions that do
more than we need them to do in favor of an efficient implementation.

Ensure that frequently used QRegExp instances are created statically
and reused between invocations, so they can make use of JIT and other
optimizations.

As some of the affected methods are called *very* frequently, this
provides significant savings in terms of allocations, and
significantly reduces memory fragmentation as well.

Modernize some of the related code. Clean up includes, too.


No differences found