[matcher] Micro-optimize

Some 2% in Duployan & Roboto.
This commit is contained in:
Behdad Esfahbod committed 2026-01-05 17:47:17 -07:00
1 parent 120a38a55e
commit 5163127641
1 file changed
+4 -2
+4 -2
View File
@@ -582,11 +582,12 @@ struct skipping_iterator_t
#endif
bool next (unsigned *unsafe_to = nullptr)
{
auto *info = c->buffer->info;
const signed stop = (signed) end - 1;
while ((signed) idx < stop)
{
idx++;
switch (match (c->buffer->info[idx]))
switch (match (info[idx]))
{
case MATCH:
{
@@ -612,11 +613,12 @@ struct skipping_iterator_t
#endif
bool prev (unsigned *unsafe_from = nullptr)
{
auto *out_info = c->buffer->out_info;
const unsigned stop = 0;
while (idx > stop)
{
idx--;
switch (match (c->buffer->out_info[idx]))
switch (match (out_info[idx]))
{
case MATCH:
{