Re: Faster UTF-8 decoding in GLib



Hi,

2010/3/16 Daniel Elstner <daniel kitta googlemail com>:
>
> In any case, I
> expect my solution to actually compete best if *not* inline, because it
> avoids the GOT lookup, which would be another nested function call on
> i386.  Without the GOT lookup, it becomes a true leaf function.

I have tested your solution as applied to mainline g_utf8_get_char(),
and not inlined except any intra-file optimizations. The results are
for ARM this time.

Mainline:

GTest: run: /utf8/perf/get_char
(MAXPERF:ASCII:      25.7 MB/s)
(MAXPERF:Latin-1:    26.3 MB/s)
(MAXPERF:Cyrillic:   30.8 MB/s)
(MAXPERF:Chinese:    38.2 MB/s)
GTest: run: /utf8/perf/utf8_to_ucs4
(MAXPERF:ASCII:      10.3 MB/s)
(MAXPERF:Latin-1:    11.4 MB/s)
(MAXPERF:Cyrillic:   13.6 MB/s)
(MAXPERF:Chinese:    16.9 MB/s)

Yours:

GTest: run: /utf8/perf/get_char
(MAXPERF:ASCII:      25.6 MB/s)
(MAXPERF:Latin-1:    28.2 MB/s)
(MAXPERF:Cyrillic:   40.1 MB/s)
(MAXPERF:Chinese:    53.9 MB/s)
GTest: run: /utf8/perf/utf8_to_ucs4
(MAXPERF:ASCII:      13.6 MB/s)
(MAXPERF:Latin-1:    15.3 MB/s)
(MAXPERF:Cyrillic:   17.8 MB/s)
(MAXPERF:Chinese:    22.2 MB/s)

My tableware (g_utf8_get_char() inlined):

GTest: run: /utf8/perf/get_char
(MAXPERF:ASCII:      32.1 MB/s)
(MAXPERF:Latin-1:    31.5 MB/s)
(MAXPERF:Cyrillic:   47.0 MB/s)
(MAXPERF:Chinese:    74.9 MB/s)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]