-
Notifications
You must be signed in to change notification settings - Fork 682
hb_set_t optimizations #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
hb_set_t previously used a statically allocated bit vector big enough to store the whole range of codepoints. now, pages are created for each small bitvector dynamically as needed.
|
Humm. Is github confused about this branch? |
|
Very confused. Ignore it until I finish this task. This branch was just for the review questions I asked last Thursday. |
|
Ok. Just checked the patch. I think I have more comments for you. Wait for that before spending much more time on it. Thanks! |
| @@ -324,7 +324,7 @@ struct hb_set_t | |||
| static const unsigned int SHIFT = 5; | |||
| static const unsigned int BITS = (1 << SHIFT); | |||
| static const unsigned int MASK = BITS - 1; | |||
| static const unsigned int ELTS = (MAX_G + 1 + (BITS - 1)) / BITS; | |||
| static const unsigned int ELTS = (MAX_G + 1) / BITS; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, old cold was implementing ceil(), which is correct, since it does not make assumption on MAX_G + 1 being divisible by BITS.
|
Heh. I have had commented on that before... I'll try to clean this up and merge finally. :) |
|
Would be nice to see this go in. It was my biggest contribution to harfbuzz :) Let me know if I can help you merge this. |
|
Hi Behdad. Any news about this PR? Anything I can help you with? Thanks 😄 |
|
@timofonic let's see what @behdad says 😄 |
Add binding for kerning callbacks. Make feature fields public.
First stage of the optimizations changes.
Switched the data structure used for the set to a dynamic array of bit vectors like fontconfig's FcCharSet. Basic functions supported (creating, setting, checking, etc). A good moment to get it reviewed before switching the rest of the functions (algebra and iter).
Let me know when you have time to discuss this. I have a few ideas for further improvements in stage 2.
There are 2 smal bugs I am aware of, don't worry about them :)