Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokenizer: use Python objects to represent tokens #521

Closed
wants to merge 19 commits into from
Closed

Tokenizer: use Python objects to represent tokens #521

wants to merge 19 commits into from

Conversation

jayaddison
Copy link
Contributor

This change refactors the tokenizer module to use Python object instances where previously plain dictionaries were used to hold token state.

This builds upon #519, #520 and attempts to resolve #24.

@jayaddison
Copy link
Contributor Author

NB: This isn't suitable for merge currently; it seems to introduce a noticeable performance penalty:

Before (2c19b98)

.........................................
html_parse_etree: Mean +- std dev: 202 ms +- 10 ms

After (8772408)

.........................................
html_parse_etree: Mean +- std dev: 226 ms +- 11 ms

@gsnedders
Copy link
Member

This builds upon #519, #520 and attempts to resolve #24.

Leaving reviewing this till after those two, FYI.

@jayaddison
Copy link
Contributor Author

Cleaning up some old / stale pull requests; please let me know if this changeset is considered worthwhile and I'll reopen if so.

@jayaddison jayaddison closed this Dec 24, 2022
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.

Move tokens to being objects
2 participants