-
Notifications
You must be signed in to change notification settings - Fork 35
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
Re-implement callbacks in JS #97
Conversation
9c61b53
to
682a0cd
Compare
e2c0f36
to
3b60f9a
Compare
6655c17
to
18be250
Compare
Any perf numbers? |
There does not seem to be any measurable difference. Drawing the same glyph a million times: old:
new:
Drawing all glyphs in NotoSans-Regular a 100 times: old:
new:
|
That's quite impressive! |
That's consistent with what I've found. I did a lot of profiling of C++ map, string, and array operations vs JS equivalents, and JS was at worst the same. String concatenation was always faster in JS. Though one thing nice about C++ is you don't have the garbage collector running, which can take seconds when you're working with huge amounts of memory. This looks great! I did not know about A little off-topic (shameless plug?) but I moved my harfbuzzjs efforts to here. One thing I did to get hbjs working in a production environment was put the glyph infos, positions and flags in a flattened |
Thanks for sharing. I don't think TypeScript is a problem. |
… it adds support for features to shape.
Test both cubic and quadratic glyphs.
Also fixes #83
Any objection to merging this? |
Go ahead! |
This was Ina overtly reverted back to 8.3.1 while merging #97
This paves the way to passing callback functions from JS to wasm and serves as an example.