Behdad Esfahbod
|
690af7aa69
|
[GPOS] Sanitize Device tables lazily
This speeds up face loading for variable fonts by 80%!
Comparing before to after
Benchmark Time CPU Time Old Time New CPU Old CPU New
---------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_Font/load_face_and_shape/Roboto-Regular.ttf/hb -0.0368 -0.0366 20 20 20 19
BM_Font/load_face_and_shape/RobotoFlex-Variable.ttf/hb -0.7149 -0.7162 77 22 77 22
BM_Font/load_face_and_shape/RobotoFlex-Variable.ttf/var/hb -0.7241 -0.7255 80 22 79 22
BM_Font/load_face_and_shape/SourceSansPro-Regular.otf/hb -0.1441 -0.1445 28 24 28 24
BM_Font/load_face_and_shape/AdobeVFPrototype.otf/hb -0.7893 -0.7910 66 14 66 14
BM_Font/load_face_and_shape/AdobeVFPrototype.otf/var/hb -0.7865 -0.7882 67 14 66 14
BM_Font/load_face_and_shape/SourceSerifVariable-Roman.ttf/hb -0.8895 -0.8900 227 25 226 25
BM_Font/load_face_and_shape/SourceSerifVariable-Roman.ttf/var/hb -0.8895 -0.8900 226 25 225 25
BM_Font/load_face_and_shape/Comfortaa-Regular-new.ttf/hb -0.5512 -0.5531 42 19 42 19
BM_Font/load_face_and_shape/NotoNastaliqUrdu-Regular.ttf/hb -0.1511 -0.1510 227 192 225 191
BM_Font/load_face_and_shape/NotoSerifMyanmar-Regular.otf/hb -0.1494 -0.1498 41 35 40 34
OVERALL_GEOMEAN -0.6443 -0.6456 0 0 0 0
|
2023-06-30 11:05:54 -06:00 |
|
Behdad Esfahbod
|
d338506ccf
|
[GPOS] Reuse sanitize_values_stride_unsafe in another function
|
2023-06-30 10:13:05 -06:00 |
|
Behdad Esfahbod
|
794fac327c
|
[glyf] Minor another range for loop
|
2023-06-29 20:56:16 -06:00 |
|
Behdad Esfahbod
|
0ae1676626
|
[CompositeGlyph] Minor use a range for loop
|
2023-06-29 20:38:42 -06:00 |
|
Behdad Esfahbod
|
05c01ad5d3
|
[SimpleGlyph] Minor use a range for loop
|
2023-06-29 16:49:20 -06:00 |
|
Behdad Esfahbod
|
4123e0c757
|
[path-builder] Speed up mid-point calculation
|
2023-06-29 16:27:35 -06:00 |
|
Behdad Esfahbod
|
ca44c38c52
|
Add HB_ALWAYS_INLINE
With MSVC implementation as well.
|
2023-06-29 14:41:21 -06:00 |
|
Behdad Esfahbod
|
c49ca37115
|
[Glyph] Minor micro-optimize away a function call
For when coords are not set.
|
2023-06-29 12:38:45 -06:00 |
|
Behdad Esfahbod
|
5fb7b02ac1
|
[CompositeGlyph] Minor use range loop
|
2023-06-29 12:28:43 -06:00 |
|
Behdad Esfahbod
|
20b32b049b
|
[SimpleGlyph] Micro-optimize phantom_only
|
2023-06-29 12:08:11 -06:00 |
|
Behdad Esfahbod
|
04809ede8e
|
[CompositeGlyph] Micro-optimize translate()
|
2023-06-29 11:58:53 -06:00 |
|
Behdad Esfahbod
|
229db9735e
|
[CompositeGlyph] Minor use vector::push()
|
2023-06-29 11:54:10 -06:00 |
|
Behdad Esfahbod
|
75101802a1
|
[CompositeGlyph] Micro-optimize
|
2023-06-29 10:54:49 -06:00 |
|
Behdad Esfahbod
|
e9d74d6bb3
|
[SimpleGlyph] Minor add an unlikely to error condition
|
2023-06-29 10:53:52 -06:00 |
|
Behdad Esfahbod
|
6abca413ae
|
[path-builder] Micro-optimize
No need to initialize these when has_data=false.
|
2023-06-29 10:39:49 -06:00 |
|
Behdad Esfahbod
|
5703c1c4ea
|
[path-builder] Add a couple of unlikely's
|
2023-06-29 10:35:23 -06:00 |
|
Behdad Esfahbod
|
f5eead04e6
|
[glyf/gvar] Optimize getting variable phantom points
Used when there's no HVAR table and get_h_advance().
I see some 10% speedup with a SourceSerifVariable-Roman with
the HVAR table removed.
|
2023-06-28 15:07:15 -06:00 |
|
Behdad Esfahbod
|
e42d6df55e
|
[glyf] Minor refactor a couple of lines and micro-optimize
|
2023-06-28 14:25:26 -06:00 |
|
Behdad Esfahbod
|
c31471d10e
|
[glyf] Micro-optimize
|
2023-06-28 13:51:54 -06:00 |
|
Behdad Esfahbod
|
83d75d5e9b
|
[glyf] always_inline consume_point
7% speedup in:
BM_Font/draw_glyph/Roboto-Regular.ttf/hb
|
2023-06-28 13:35:24 -06:00 |
|
Behdad Esfahbod
|
8795ccedd6
|
Revert "[SimpleGlyph] Avoid branches in read_points"
This reverts commit ba062c713e.
|
2023-06-28 13:29:29 -06:00 |
|
Behdad Esfahbod
|
ba062c713e
|
[SimpleGlyph] Avoid branches in read_points
Calculate total bytes in read_flags and bounds-check once.
This slows things down apparently, so going to revert.
|
2023-06-28 13:24:37 -06:00 |
|
أحمد المحمودي (Ahmed El-Mahmoudy)
|
10b9ca54e1
|
Fix typo: subtitution -> substitution
|
2023-06-28 11:36:52 -04:00 |
|
Behdad Esfahbod
|
452557cd18
|
Replace a free with hb_free
Ouch.
|
2023-06-26 18:40:54 -06:00 |
|
Behdad Esfahbod
|
1fc128f609
|
Replace a few memset/memcpy's with hb_ equivalents
|
2023-06-26 18:36:23 -06:00 |
|
Behdad Esfahbod
|
67b1624727
|
[set] Simplify a few set iterations as range loop
|
2023-06-07 16:25:11 -06:00 |
|
Behdad Esfahbod
|
dcecb4d16b
|
[subset/ValueFormat] Micro-optimize
|
2023-06-05 16:03:36 -06:00 |
|
Behdad Esfahbod
|
469e82a227
|
[subset/PairPos] Micro-optimize
|
2023-06-05 15:23:22 -06:00 |
|
Behdad Esfahbod
|
6593d2aaba
|
[subset/PairPos] Speed up
|
2023-06-05 15:11:43 -06:00 |
|
Behdad Esfahbod
|
15048e50ec
|
[serialize] Add more function attributes
|
2023-06-04 10:07:04 -06:00 |
|
Behdad Esfahbod
|
4e076da9d0
|
Another try at fixing build
|
2023-06-04 09:49:08 -06:00 |
|
Behdad Esfahbod
|
b08866afda
|
Fix build
|
2023-06-04 09:44:37 -06:00 |
|
Behdad Esfahbod
|
82741304d3
|
[subset] start_embed never returns nullptr
Remove checks.
|
2023-06-04 09:41:41 -06:00 |
|
Behdad Esfahbod
|
af3fdf1f9e
|
[subset/glyf] Simplify error handling
|
2023-06-04 09:24:37 -06:00 |
|
Behdad Esfahbod
|
3dd1de46d6
|
[subset/glyf] Fix a few return_trace's
|
2023-06-04 09:15:14 -06:00 |
|
Behdad Esfahbod
|
73f2f935a0
|
[subset/glyf] Fix another leak
|
2023-06-04 09:12:18 -06:00 |
|
Behdad Esfahbod
|
3d08a2f10c
|
[subset/glyf] Fix leak
|
2023-06-03 23:38:38 -06:00 |
|
Behdad Esfahbod
|
fc33200d79
|
[subset/glyf] Avoid a vector copy
Oops!
|
2023-06-03 23:29:39 -06:00 |
|
Behdad Esfahbod
|
3bfcbd6149
|
[subset/glyf] Minor use range lopp
|
2023-06-03 23:17:56 -06:00 |
|
Behdad Esfahbod
|
917c8d0ac5
|
[subset/glyf] Minor change of value
|
2023-06-03 23:15:56 -06:00 |
|
Behdad Esfahbod
|
b5792f117a
|
[subset] Reuse num_glyphs in various places
|
2023-06-03 22:24:06 -06:00 |
|
Behdad Esfahbod
|
87cf09bd2c
|
[subset/loca] Fix up for retaingid null glyphs at the end
We currently don't have those, but in case we add.
|
2023-06-03 21:00:56 -06:00 |
|
Behdad Esfahbod
|
38fa032330
|
Revert "[subset/loca] Build in the serializer memory"
This reverts commit 546b518186.
|
2023-06-03 18:51:09 -06:00 |
|
Behdad Esfahbod
|
546b518186
|
[subset/loca] Build in the serializer memory
Because it's hot. Doesn't seem to speed up though. Slight
slowdown. Going to revert.
|
2023-06-03 18:50:35 -06:00 |
|
Behdad Esfahbod
|
3cb2b49e61
|
[subset/loca] Shuffle code around
|
2023-06-03 18:45:20 -06:00 |
|
Behdad Esfahbod
|
b0d0babb2e
|
[subset/loca] Rewrite loop faster
|
2023-06-03 17:14:55 -06:00 |
|
Behdad Esfahbod
|
ca27925d55
|
Use hb_codepoint_pair_t in more places
|
2023-06-03 16:18:15 -06:00 |
|
Behdad Esfahbod
|
c7493efeaf
|
[subset/loca] Micro-optimize
|
2023-06-03 15:39:27 -06:00 |
|
Behdad Esfahbod
|
efefec13cc
|
[subset/glyf] Remove unneeded codepath
|
2023-06-02 20:33:52 -06:00 |
|
Behdad Esfahbod
|
ac1f5ca0d9
|
[subset/loca] Micro-optimize
|
2023-06-02 17:07:44 -06:00 |
|