Skip to content

Don't use an IntSet for the regexps when mapping atoms to regex#60

Merged
masklinn merged 1 commit intoua-parser:mainfrom
masklinn:propagate-match-regexps-type
Mar 14, 2026
Merged

Don't use an IntSet for the regexps when mapping atoms to regex#60
masklinn merged 1 commit intoua-parser:mainfrom
masklinn:propagate-match-regexps-type

Conversation

@masklinn
Copy link
Copy Markdown
Contributor

re2 uses a straight vector and doesn't bother any further, I assume this was originally a hashset due to concerns about duplicates, then it got converted through to an IntSet as that got used for the propagation state.

Saves an allocation and a minor amount of indirection in extend, but doesn't otherwise seem to have a significant effect.

re2 uses a straight vector and doesn't bother any further, I assume
this was originally a hashset due to concerns about duplicates, then
it got converted through to an `IntSet` as that got used for the
propagation state.

Saves an allocation and a minor amount of indirection in extend, but
doesn't otherwise seem to have a significant effect.
@masklinn masklinn enabled auto-merge (rebase) March 14, 2026 20:08
@masklinn masklinn merged commit fe350f2 into ua-parser:main Mar 14, 2026
19 checks passed
@masklinn masklinn deleted the propagate-match-regexps-type branch March 14, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant