Sitelet https://web.archive.org/web/20210724195739/https://github.com/JuliaLang/julia/issues/41533
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

Use shift based DFA for utf8 validation #41533

Open
Keno opened this issue Jul 10, 2021 · 2 comments
Open

Use shift based DFA for utf8 validation #41533

Keno opened this issue Jul 10, 2021 · 2 comments

Comments

@Keno
Copy link
Member

@Keno Keno commented Jul 10, 2021

There's a post going around on Twitter for how to write a super fast DFA, e.g. for UTF8 validation: https://twitter.com/_rsc/status/1413843059972923394?s=19. We have a UTF8 validation function, so we should try this technique. Should be reasonably simple to do.

@Keno
Copy link
Member Author

@Keno Keno commented Jul 10, 2021

I guess there's also this: https://lemire.me/blog/2020/10/20/ridiculously-fast-unicode-utf-8-validation/, which may be implemented elsewhere in the ecosystem.

@StefanKarpinski
Copy link
Member

@StefanKarpinski StefanKarpinski commented Jul 10, 2021

I read through the Lemire paper for inspiration on vectorized string length that handles our way of counting invalid data as characters correctly. Can't find the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants