Hi Werner,
I wrote a small test that measures initializing the autohinter. Attached. Would be nice if ftbench could do this as well. Ie. not just load face, but load face and try loading one glyph.
With this, and with Roboto-Regular as well as Noto Naskh Arabic, initializing autohinter is 8 and 11 times slower if FreeType is compiled with HarfBuzz. So I debugged this. It came down to my inefficient hb_set_t implementation, but also that you are calling hb_set_create() a lot, 340 times! I trimmed that down significantly by just moving the set creation closer to when it's needed. That speeds it up by 25%ish. Patch attached.
The rest of the fix is to actually fix my hb_set_t implementation to be efficient. With this WIP patchset: