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

switch to regex::Regex #22

Merged
merged 1 commit into from
Nov 9, 2024
Merged

switch to regex::Regex #22

merged 1 commit into from
Nov 9, 2024

Conversation

tmm1
Copy link

@tmm1 tmm1 commented Nov 9, 2024

@tmm1 tmm1 merged commit 8ed2e82 into main Nov 9, 2024
1 check passed
tmm1 pushed a commit that referenced this pull request Nov 9, 2024
Based on openai#331

Uses Regex in _encode_ordinary_native instead of fancy-regex, to get a 6x speedup. To make the
regex patterns compatible with Regex, drops part of thpatterns for whitespaces, and handles the
whitespaces with scripting instead of regex. Still with exact same output. _encode_native calls
_encode_ordinary_native_impl directly (_encode_ordinary_native is a wrapper of
_encode_ordinary_native now).
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