-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Multiple implementation partial refactoring #197
Conversation
@ioioioio Thank you. |
I will review shortly. I will verify performance. |
I have verified that the instruction count is nearly the same (+/- instruction) for both stage 1 and stage 2. |
…#ifdef to select the right SIMD set all the time. Fixing indentation. Removing some obsolete WARN_UNUSED. Fixing a weird warning with optind variable.
See my commit aa78b70 where I have a workaround for the ugliness: we default the template on a "native" instruction set. Essentially, I am pushing the #ifdef up into the library itself. |
Note that this code moves much of the stage 1 implementation into a header file. There are ways to avoid this, but it is always a bit finicky whereas the "header file" approach always works. So I think what we have here is fine. |
@ioioioio If you are fine with the result as it stands, please merge it into master at your earliest convenience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to provide use with a good way to handle complexity and it opens the door to runtime dispatch.
This partial refactoring (not done yet for stage2) has two goals: simplify the implementation of multiple versions for different instruction sets and to eventually allow runtime dispatching. It should facilitate the merging of PR#139 and the realization of issue#20.
The benchmark shows comparable performances to the last simdjson version. Not slower, not faster.
It has been tested on ARM and the results are the same as before.
However, the modifications made on parse.cpp and statisticalmodel.cpp already show the limits of such a new structure: it might become cumbersome if we eventually need more than one entry point.
Any suggestion is welcome.