[HarfBuzz] optimize setting feature masks in the buffer

Jonathan Kew jonathan at jfkew.plus.com
Fri May 21 03:00:29 PDT 2010


Hi Behdad,

Here's a patch implementing a minor optimization of the process of setting the feature bits in the buffer.

Two things: first, check the features for the common case of (start, end) = (0, -1), collect those "global" values into a single mask, and set them all in a single pass over the buffer. And second, for features that don't use this "global" range, use a binary search to find the start position and then iterate only as far as the end of the feature range, not the end of the buffer.

JK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: feature-range-opt.patch
Type: application/octet-stream
Size: 2249 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20100521/8272107f/attachment.obj>
-------------- next part --------------




More information about the HarfBuzz mailing list