[pcre-dev] [Bug 1040] Performance Improvement in UTF-8 mode

Góra strony
Delete this message
Autor: Philip Hazel
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1040] Performance Improvement in UTF-8 mode
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1040




--- Comment #1 from Philip Hazel <ph10@???> 2010-11-19 17:04:25 ---
If it makes as big a difference as you say, this kind of change must be worth
doing. However, I am not happy with statements like this:

c = ((c & 0x0f) << 12) | ((*eptr++ & 0x3f) << 6) | (*eptr++ & 0x3f);

The reason is that I don't think you can guarantee that the evaluation happens
in the order that you are expecting. I am always very wary about using ++ on
the same variable more than once in any expression. I think this would be safer
rewritten using subscripts, and an explicit eptr+=2 statment.

I will experiment with this patch. Thank you for taking the time to submit it.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email