Commit Graph

14782 Commits

Author SHA1 Message Date
Behdad Esfahbod b0d2641186 [vector] Add "initialize" argument to resize() 2022-11-22 10:20:11 -07:00
Behdad Esfahbod a2059f8f55 [gvar] Optimize unpack_points 2022-11-22 10:16:21 -07:00
Behdad Esfahbod 6d7206b68b [gvar] Optimize unpack_deltas 2022-11-22 10:13:14 -07:00
Behdad Esfahbod bca569ae53 [array] Speed up hash() for byte arrays 2022-11-21 23:19:42 -07:00
Behdad Esfahbod d7b492e3f5 Revert "[array] Remove hash specializations for bytes"
This reverts commit 213117317c.
2022-11-21 23:08:51 -07:00
Behdad Esfahbod 1572ba281a [subset-cff] Return in subr closure if already seen subr
Not sure why this was not done before.
2022-11-21 22:26:44 -07:00
Behdad Esfahbod a29ca6efbc [subset-cff] Comment 2022-11-21 22:02:17 -07:00
Behdad Esfahbod 28e767ddea [subset-cff] Really optimize op_str_t / parsed_cs_op_t layout
Now parsed_cs_op_t and op_str_t are both 16 bytes.

Saves another 7% in SourceHanSans/10000 benchmark.
2022-11-21 21:59:51 -07:00
Behdad Esfahbod 2d5ee23731 [subset-cff] Readjust parsed_cs_op_t
Now it doesn't matter anymore since op_str_t is adjusted and
is 16 bytes with 8byte alignment.
2022-11-21 21:55:21 -07:00
Behdad Esfahbod 4f056b923a [subset-cff] Optimize op_str_t layout 2022-11-21 21:37:57 -07:00
Behdad Esfahbod a750cb0128 Simplify rvalue creation 2022-11-21 21:03:32 -07:00
Behdad Esfahbod 86a763c651 [map] Make keys moveable 2022-11-21 20:53:44 -07:00
Behdad Esfahbod cf20d2ec5d [map] Take const key 2022-11-21 20:47:17 -07:00
Behdad Esfahbod 3d1c76f713 [serializer] Don't hash objects twice 2022-11-21 19:40:32 -07:00
Behdad Esfahbod 35878df215 [algs] Implement swap() for pair_t
Helps priority_queue::pop_minimum and friends, which help subsetter
repacker. Shows a few percentage improvement on NotoNastaliq benchmark.
2022-11-21 19:14:03 -07:00
Behdad Esfahbod a2984a2932 [cff] Remove unnecessary namespacing 2022-11-21 18:40:52 -07:00
Behdad Esfahbod dc3bb5e0ed [subset-cff] Pre-allocate values array for subroutines as well 2022-11-21 18:18:48 -07:00
Behdad Esfahbod c6279224db [cff] Adjust pre-allocation
This better matches actual usage, given that ops are one or two
bytes, and vector also allocates 50% extra.
2022-11-21 18:01:50 -07:00
Behdad Esfahbod bab8ec58b0 [subset-cff] Disable sharing when packing charstring INDEXes
Saves another 8%ish.
2022-11-21 17:46:32 -07:00
Behdad Esfahbod 2cadacad6c [cff] Simplify str_encoder_t error handling 2022-11-21 17:17:15 -07:00
Behdad Esfahbod f263e3fe2e [cff] Manually copy short strings instead of memcpy() 2022-11-21 17:04:55 -07:00
Behdad Esfahbod 38efd1862f [cff] Add a likely() 2022-11-21 17:02:11 -07:00
Behdad Esfahbod 191025cc96 [cff] Adjust buffer pre-allocation
Most ops take one or two bytes, so allocate count*2, not count*3.
Shows minor speedup in subsetting benchmark (around 2%).
2022-11-21 16:58:19 -07:00
Behdad Esfahbod 4b2caafea2 [subset-cff] Optimize parsed_cs_op_t size
Shows 5% speedup on SourceHanSans-Regular/10000 benchmark.
2022-11-21 16:46:20 -07:00
Behdad Esfahbod e0b06bd1b1 [subset] Cache has_seac in accelerator
Speeds up SourceHanSans-Regular/10000 benchmark by %25.
2022-11-21 16:30:34 -07:00
Garret Rieger dd1ba328a8 [repacker] fix fuzzer timeout.
For https://oss-fuzz.com/testcase-detail/5845846876356608. Only process the set of unique overflows.
2022-11-21 16:24:48 -07:00
Behdad Esfahbod 59451502e9 [cff] Optimize env error checking 2022-11-21 15:23:16 -07:00
Behdad Esfahbod b238578a9c [cff] Optimize INDEX operator[] 2022-11-21 14:36:57 -07:00
Behdad Esfahbod d9de515a38 [cff] Optimize byte_str_ref_t array access 2022-11-21 14:23:07 -07:00
Behdad Esfahbod a81ec9b2b6 [cff] Optimize byte_str_ref_t inc()
Shows a couple percent speedup.
2022-11-21 14:03:28 -07:00
Behdad Esfahbod 3ff75411bd [algs] Fix bot fail 2022-11-21 13:08:55 -07:00
Behdad Esfahbod b81e3989f8 Try fixing arm-eabi build after a10cfe3f32 2022-11-21 13:02:40 -07:00
Behdad Esfahbod 4c14043b06 [algs] Add output argument to hb_unsigned_mul_overflows() 2022-11-21 12:56:33 -07:00
Behdad Esfahbod 25adbb3825 [algs] Use __builtin_mul_overflow
Compiles to smaller binary.
2022-11-21 12:47:53 -07:00
Behdad Esfahbod a10cfe3f32 [algs] Write hb_in_ranges() recursively 2022-11-21 12:37:59 -07:00
Behdad Esfahbod 2e86700e30 [gvar] Add memory-barrier as in ArrayOf 2022-11-21 12:28:10 -07:00
Behdad Esfahbod b00a911fa7 [sorted-array] Add faster iterator implementation here as well 2022-11-21 12:11:30 -07:00
Behdad Esfahbod 7cc79a8a86 [vector] Adjust comment 2022-11-21 12:09:24 -07:00
Behdad Esfahbod e82a3c69dd [array/vector] Optimize range-based for-loop
Avoid bounds-checking.
2022-11-21 12:00:10 -07:00
Behdad Esfahbod 0387182c2a [ot-map] Minor refactor features[i] access 2022-11-21 11:05:47 -07:00
Behdad Esfahbod 5ee6d5d77e [cff] Add memory-barrier to INDEX
Like we do for ArrayOf.
2022-11-21 11:00:29 -07:00
Behdad Esfahbod 6905d36d73 [cff] Fix fetch_op() bounds-checking 2022-11-21 10:51:33 -07:00
Behdad Esfahbod b51ab1a9e5 [cff] Optimize byte_str_ref_t
Make it 16 bytes instead of 24.  This struct is used in the subroutine
call stack heavily.

This change makes the HB AdobeVFPrototype benchmark to become faster
than FT one, with about 6% speedup as a result of this change.
2022-11-21 10:27:07 -07:00
Behdad Esfahbod 7a39464b18 [cff] Hide members of byte_str_ref_t 2022-11-21 09:48:54 -07:00
Behdad Esfahbod 18141f0007 [cff] Move a sub_array call
No logic change.... I hope?!
2022-11-21 09:47:03 -07:00
Behdad Esfahbod f66415cdd1 [cff] Move initialization of a type to constructor 2022-11-21 09:40:16 -07:00
Behdad Esfahbod 70a5cd53f6 [algs] Assert trivial copy assignable in stable_sort 2022-11-21 08:52:33 -07:00
Behdad Esfahbod 9bb39423f5 [algs] Simplify stable_sort signatures 2022-11-20 17:40:54 -07:00
Behdad Esfahbod d119568df6 [cbdt] Use vector tail() 2022-11-20 14:11:51 -07:00
Behdad Esfahbod 87a88117c8 [object] Use vector tail() 2022-11-20 14:10:39 -07:00