-
Notifications
You must be signed in to change notification settings - Fork 0
Simd json encode #120
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
base: master
Are you sure you want to change the base?
Simd json encode #120
Conversation
I have no C toolchain setup so here is my idea in human words:
The keypoint is to set/use mask even for non-SIMD (no SIMD support or too short input) to be able to process the "maybe to-be-escaped" characters at one place as before. That should generate shorter code, optimal performance for "never-to-be-escaped" chracters and hopefully introduce minimal overhead for other characters. |
A couple of points regarding your suggestion:
|
This reverts commit d7f2562.
VTune shows some DSB stalls, that I have tried to improve by changing code layout. I also see some bad speculation (machine check) and data stalls in php_json_printable_ascii_escape (as expected) that I want to investigate. |
The overhead of the worst case with escapes is now only around 6%, so relatively small. |
TODO:
more performant resolver (too much call overhead, use template-style code)SEMI-DONE, it's not worth going for the extra few percentages because that will create a lot of code bloat.