[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU awk very slow with multibyte locale and long strings
From: |
Davide Brini |
Subject: |
GNU awk very slow with multibyte locale and long strings |
Date: |
Sun, 15 Aug 2010 14:40:24 +0100 |
Hi Arnold, all
It was brought to my attention on IRC the following thread:
http://lists.suckless.org/dev/1008/5479.html
the results of which seem to indicate that GNU awk performance gets worse
linearly with the increase in string size, even with such a simple test
case.
I can reproduce the results on my system (with locale en_GB.utf8, gawk
3.1.8).
As mentioned in the thread, GNU awk is the only one that supports multibyte
locales, and some tracing shows that in the test case it spends almost all
the time calling mbrtowc(). This is with a UTF-8 locale.
Indeed, if the tests are repeated with LC_ALL=C, GNU awk is very fast in
both cases.
I don't know if this is expected behavior, but I thought it would be good
to report it anyway.
Thanks,
--
D.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- GNU awk very slow with multibyte locale and long strings,
Davide Brini <=