[Development] Unicode/i18n support

Giuseppe D'Angelo dangelog at gmail.com
Thu Dec 1 01:47:28 CET 2011


2011/11/29 Thiago Macieira <thiago.macieira at intel.com>:
> On Friday, 25 de November de 2011 08.30.56, lars.knoll at nokia.com wrote:
>> My proposal would be to simplify this setup and start relying on ICU for
>> many of the tasks. We would still expose things through a Qt API though.
>> It would simplify the maintenance of our Unicode support, as we can rely
>> on ICU for most things.
>
> Looks like we're settled on ICU. I can't find the thread on the regular
> expression library tests -- has anyone looked at ICU RE? How does it compare
> in terms of *performance* with PCRE?

If some ICU expert may kindly review my code (so that I'm sure I
didn't do anything stupid :( ), here you are some results inspired by
this simple test [1] (using the same regexps and test data [2]).

********* Start testing of REBenchmark *********
Config: Using QTest library 4.7.4, Qt 4.7.4
PASS   : REBenchmark::initTestCase()
RESULT : REBenchmark::PCREBenchmark():"URI":
     1,126 msecs per iteration (total: 1,126, iterations: 1)
RESULT : REBenchmark::PCREBenchmark():"Email":
     1,800 msecs per iteration (total: 1,800, iterations: 1)
RESULT : REBenchmark::PCREBenchmark():"Date":
     99 msecs per iteration (total: 99, iterations: 1)
RESULT : REBenchmark::PCREBenchmark():"URI|Email":
     2,637 msecs per iteration (total: 2,637, iterations: 1)
PASS   : REBenchmark::PCREBenchmark()
RESULT : REBenchmark::ICUBenchmark():"URI":
     12,957 msecs per iteration (total: 12,957, iterations: 1)
RESULT : REBenchmark::ICUBenchmark():"Email":
     17,972 msecs per iteration (total: 17,972, iterations: 1)
RESULT : REBenchmark::ICUBenchmark():"Date":
     393 msecs per iteration (total: 393, iterations: 1)
RESULT : REBenchmark::ICUBenchmark():"URI|Email":
     35,858 msecs per iteration (total: 35,858, iterations: 1)
PASS   : REBenchmark::ICUBenchmark()
PASS   : REBenchmark::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of REBenchmark *********

Testing platform is Ubuntu 10.04 LTS 32 bit, Core(TM)2 Duo CPU
P9600  @ 2.66GHz, 4GB RAM, GCC 4.4.3, Qt 4.7.4, PCRE 8.20, ICU
4.8.1.1.

Code is here: http://pastebin.com/UjTNEVW1 .

Cheers,
-- 
Giuseppe D'Angelo

[1] http://lh3lh3.users.sourceforge.net/reb.shtml
[2] http://people.unipmn.it/manzini/lightweight/corpus/howto.bz2



More information about the Development mailing list