PATCH: speed up GR_UnixPangoGraphics::shape()

From: Robert Wilhelm <robert.wilhelm_at_gmx.net>
Date: Wed Feb 22 2006 - 22:18:16 CET

Tomas, please have a look at my patch.

As
http://www.figuiere.net/hub/blog/images/02spellcheck-callee-list-after.jpg
shows, one top cycle eater in this benchmark is the UTF8Iterator code.

Most of these calls are in GR_UnixPangoGraphics::shape() which shows
quadratic behavior in the loop which translates byte offsets to glyph
offsets.

As the offsets are already ordered, I think we can use a very simple
loop to reach the same goal. See attached patch.

Because it is so simple, I guess that I am probably overlooking
something...

-- 
Robert Wilhelm <robert.wilhelm@gmx.net>

Received on Wed Feb 22 22:18:23 2006

This archive was generated by hypermail 2.1.8 : Wed Feb 22 2006 - 22:18:23 CET