From 22c876331a06ba8790000c7a9f76c3b5fadded24 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 23 Dec 2025 15:38:51 -0700 Subject: [PATCH] [calculate-scalar] Jump-skip 4 zeros at a time --- src/hb-ot-var-common.hh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hb-ot-var-common.hh b/src/hb-ot-var-common.hh index 8cf22f73d..ef3149a55 100644 --- a/src/hb-ot-var-common.hh +++ b/src/hb-ot-var-common.hh @@ -154,6 +154,13 @@ struct TupleVariationHeader double scalar = 1.0; for (unsigned int i = 0; i < coord_count; i++) { +#ifndef HB_OPTIMIZE_SIZE +#if HB_FAST_NUM_ACCESS + while (i + 4 < coord_count && * (HBUINT64LE *) &peak_tuple[i] == 0) + i += 4; +#endif +#endif + int peak = peak_tuple[i].to_int (); if (!peak) continue;