qt5base-lts/tests/auto
Thiago Macieira c250a0ec3a Unify and optimize QByteArray::to{Upper,Lower}
Do a check first if we need to transform before doing the transform.
This means we won't detach when transforming data that is already
correct.

And instead of using QChar, use our own hand-rolled table. In a proper
LTO build, the QChar calls would be resolved to a lookup of the Unicode
data, but not many people do LTO builds, Therefore, this means a great
speed-up is achieved by simply avoiding the function call. The extra
gain in performance comes from the simpler translation table instead of
the more complex full-Unicode data.

Also as a consequence, this changes the handling of two characters in
Latin 1: 'ß' should be uppercased to "SS" but we won't do it, and 'ÿ'
can't be uppercased in Latin 1 ('Ÿ' is outside the range).

Benchmarking is included. Comparing the Qt 5.4 algorithm to the new code
is almost 20x faster. Other alternatives are included in the benchmark
and are all faster than the current code, though slower than the new
one. While all of them could compress the tables to be smaller or shared
between uppercasing and lowercasing, they would also expand to more code
(though probably less than the extra bytes required in the full
translation table). In the trade-off, I decided to go with simplicity
and most efficient code.

Change-Id: I002d98318d236de0d27ffbea39d662cbed359985
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 03:39:05 +02:00
..
android Android: Add uninstall option. 2014-07-21 20:38:00 +02:00
bic/data test: Add 5.1.0 bic data for linux-gcc-ia32 2013-07-08 21:47:36 +02:00
cmake Fix cmake-test for Dynamic OpenGL. 2014-08-05 06:34:33 +02:00
compilerwarnings/data Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
concurrent QtConcurrent::run: allow to select the thread pool on which to run the task 2014-08-05 18:05:04 +02:00
corelib Unify and optimize QByteArray::to{Upper,Lower} 2014-08-19 03:39:05 +02:00
dbus Fix dangling pointer dereferencing 2014-05-09 03:39:34 +02:00
gui Make the expose region local on all platforms 2014-08-12 07:47:32 +02:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network winrt: Add partial SSL key support 2014-08-13 21:09:51 +02:00
opengl Merge remote-tracking branch 'origin/stable' into dev 2014-05-06 16:50:03 +02:00
other Merge remote-tracking branch 'origin/5.4' into dev 2014-08-18 15:25:11 +02:00
printsupport QPrinter - Expect failure of QPrinter page size test 2014-03-17 13:46:29 +01:00
shared iOS: Fix compilation of some basic tests 2014-01-17 11:04:43 +01:00
sql Use sched_yield instead of pthread_yield 2014-05-05 22:40:49 +02:00
testlib Merge remote-tracking branch 'origin/stable' into dev 2014-05-22 07:46:17 +02:00
tools add priority sorting to $$resolve_depends() 2014-07-30 10:31:53 +02:00
widgets OS X: Remove mnemonics in parentheses 2014-08-08 10:44:29 +02:00
xml Speed up tst_QXmlSimpleReader. 2014-05-08 16:06:11 +02:00
auto.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00
network-settings.h network test settings: support newer FTP server versions 2013-08-28 12:45:34 +02:00
qtest-config.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
test.pl Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00