Skip to content

extract regex - #411

Open
gaiarajan wants to merge 1 commit into
datamade:mainfrom
gaiarajan:main
Open

extract regex#411
gaiarajan wants to merge 1 commit into
datamade:mainfrom
gaiarajan:main

Conversation

@gaiarajan

@gaiarajan gaiarajan commented Aug 12, 2026

Copy link
Copy Markdown

Overview

Extracts all regex so we only have to initialize it once.

Closes #410

Benchmark, 20,000 calls on a sample address:

tokenize():
Before: 7.16 µs/call
After: 5.00 µs/call (30% faster)

tag():
Before: 247.4 µs/call
After: 228.9 µs/call (7.5% faster)

I think this is a large enough performance improvement to be worth it.

pytest is still green (4972 / 4972 passing).

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.

Initialize all regex once

1 participant