[matcher] Leave inlining decision on next/prev to compiler Forcing this inline speeds up most benchmarks by a few percents, but at least for the Duployan benchmark, it slows it down by 40%. This is on Apple silicon. I had noticed that HarfRust was performing faster on this benchmark, and after lots of investigation, this force-inline seemed to be the culprit.
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 2c47931..0437e44 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh
@@ -577,9 +577,6 @@ return SKIP; } -#ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE -#endif bool next (unsigned *unsafe_to = nullptr) { auto *info = c->buffer->info; @@ -608,9 +605,6 @@ *unsafe_to = end; return false; } -#ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE -#endif bool prev (unsigned *unsafe_from = nullptr) { auto *out_info = c->buffer->out_info;