On Sat, Jan 05, 2008 at 02:11:35AM -0800, chromatic wrote: > On Saturday 05 January 2008 01:26:48 Patrick R. Michaud wrote: > > > As of r24557 I've rewritten find_cclass and find_not_cclass > > so that they use a string iterator instead of repeated calls > > to ENCODING_GET_CODEPOINT. I also improved utf8_set_position > > a bit so that it doesn't always have to restart position > > counting from the beginning of the string. As a result, > > compiling the actions.pl script on my machine goes from 39s to > > a little over 28s -- about a 25% speed increase. > > Profile-wise, these two changes represent a 21.6% increase. That's not bad > at > all! > > utf8_skip_forward() is about seven times faster now, while > utf8_set_position() > is about 1.5 times faster.
I suspect the reality is that utf8_skip_forward is being called only 1/7th as much, since I didn't do anything to speed up any individual call. This makes sense to me, since the find_* opcodes (used quite a bit by PGE) are now using string iterators instead of repeated calls to ENCODING_GET_CODEPOINT. Pm