diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-05-01 13:20:52 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-06-10 17:57:03 +0000 |
commit | fb498a651990df5e04c75a9076da28e875c43f73 (patch) | |
tree | 0dd83b46f3d1f716eacf221183ded40535a9c111 /src/corelib/tools/qregularexpression.h | |
parent | 3eb5b15d800f575b08eb1fc97b365d3e33e4bc7e (diff) |
Long live the short QDateTime optimization
Well, maybe not for so long: we may want to revisit it for Qt 6. At the
very least, we should enlarge the size of QDateTime on 32-bit system so
that they too can benefit from the optimization.
With this optimization, on 64-bit systems, the most common uses of
QDateTime now no longer allocate memory at all. The range is slightly
reduced from 584,554,049 years to 2,283,414 years around 1970. The other
drawback is that calling QDateTime::offsetFromUtc() on a localtime now
needs to recalculate the offset, instead of using the cached offset.
(QDateTime::toMSecsSinceEpoch() didn't use the cache).
Change-Id: Id5480807d25e49e78b79ffff144a8b2c9af91814
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/tools/qregularexpression.h')
0 files changed, 0 insertions, 0 deletions