diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-08-25 16:17:05 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-10-27 22:43:31 +0000 |
| commit | 763f19151cc31ca1ba4912e0828359be5dba89e8 (patch) | |
| tree | 4f780ca2d14533eb6b8536c1aafcbdf8e371116a /src/network/access/qhttpnetworkrequest.cpp | |
| parent | eefea5bf9d8141fb920a9612cc6d274890d9ebd8 (diff) | |
QUnicodeTables: separate Properties::cases from the rest
These entries are quite repetitive, esp. the all-zero entry for
uncased characters (but not only: there are also 137 non-zero
duplicates), and each one takes 8 bytes of the total 20 bytes of
sizeof(Properties).
Make a new array with these entries and only store an index into it in
Properties. The new array happens to have a size of 448 entries (down
from 3372 unique Properties), so 9 bits would suffice for the index,
but a sizeof(Properties) == 14 is probably rather pointless, so add a
reserved field to prop the struct up to 16. That sounds like the ideal
size for rapid indexing and probably improves qGetProp() performance,
esp. if case information is not needed.
Theoretically, this should save 3372 * 4 - 448 * 8 = 9904 bytes. The
TEXT size of libQtCore, however shrinks by a bit more, 10596 bytes, on
optimized Linux AMD64 Clang 19 builds.
Picking to all active branches, because the Unicode tables are
still maintained in all of them.
Fixes: QTBUG-139427
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: If4dc47ef06c674ad0263f0623ec408a25b977b3a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/network/access/qhttpnetworkrequest.cpp')
0 files changed, 0 insertions, 0 deletions
