On May 1, 2016, at 7:35 PM, Thiago Macieira <[email protected]<mailto:[email protected]>> wrote:
Hello https://codereview.qt-project.org/157714 I've just pushed one large commit that changes QDateTime to support a "short QDateTime Optimisation". Inspired by the SSO mechanism used in libc++ and similar to what we've done to QVersionNumber, I've made QDateTime not allocate memory for most uses (local time or UTC, within 2 million years of 1970). The optimisation is only for 64-bit systems, since QDateTime simply wasn't wide enough to accommodate the data. 32 bits isn't enough for storing seconds since 1970, much less milliseconds and the extra information we needed. But on 64-bit systems, the pointer is split in two: 8 bits for status flags (including the LSB indicating it's a short QDateTime) and 56 bits for the millisecond count. The commit is quite large. I will spend some time during the next week seeing if I can split it up into bite-sized chunks. Meanwhile, I'd like to ask for help testing this. Since I've dropped the use of QSharedDataPointer, I might have introduced sharing issues. And I'd really like someone to run the unit tests on a big-endian system. Too bad, I thought I could have helped you here but the MIPS board I just bought is LE. :( You could always try Debian mips or ppc in qemu. They have prebuilt images. -- Thiago Macieira - thiago.macieira (AT) intel.com<http://intel.com> Software Architect - Intel Open Source Technology Center _______________________________________________ Development mailing list [email protected]<mailto:[email protected]> http://lists.qt-project.org/mailman/listinfo/development -- Jake Petroules - [email protected]<mailto:[email protected]> Consulting Services Engineer - The Qt Company Qbs build system evangelist - qbs.io<http://qbs.io>
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
