From 4bfa44407de8f5b2a37df7599e63263d258d6778 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 23 Nov 2025 21:27:47 -0700 Subject: [PATCH] [TupleValues] Inline decompile_deltas (#5651) 8% speedup in GoogleSansFlex heavy variations test. $ b/perf/benchmark-font GSF.ttf --benchmark_filter=draw.*var/ot --variations=ROND=40,wght=500,wdth=50,opsz=54,slnt=-10,GRAD=50 --- src/hb-open-type.hh | 3 +++ src/hb-ot-var-common.hh | 1 + 2 files changed, 4 insertions(+) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 2217bb2b7..61ee139db 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -1711,6 +1711,9 @@ struct TupleValues } template +#ifndef HB_OPTIMIZE_SIZE + HB_ALWAYS_INLINE +#endif static bool decompile (const HBUINT8 *&p /* IN/OUT */, hb_vector_t &values /* IN/OUT */, const HBUINT8 *end, diff --git a/src/hb-ot-var-common.hh b/src/hb-ot-var-common.hh index 492f7658a..8cf22f73d 100644 --- a/src/hb-ot-var-common.hh +++ b/src/hb-ot-var-common.hh @@ -1534,6 +1534,7 @@ struct TupleVariationData } template + HB_ALWAYS_INLINE static bool decompile_deltas (const HBUINT8 *&p /* IN/OUT */, hb_vector_t &deltas /* IN/OUT */, const HBUINT8 *end,