-
Notifications
You must be signed in to change notification settings - Fork 14
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
ASCIIHexDecode should be vectorized #8
Comments
@sambitdash can you explain more how you can "vectorize" this to make it a vector operation? |
The vector operation code generation is to be carried out by the compiler not human optimized as the code needs to be run on varied disparate processors. Most processors support vector operations like SIMD if the code does not have unnecessary branching. However, if you are look at the byte operation code it's full of branching. A sample code for this can be seen in the comment: JuliaLang/julia#23267 (comment) However, the generated code was not reviewed for potential further optimizations. Hope this explains what is needed. Also note that you may not need error handling in stream operations but can repair errors as streams may have corrupt data. So error recovery may be desirable than exit on failure. |
This may not be needed as PDF spec does not mandate the streams to have even number of hexits. It can also have control characters like CR-LF. So the branching may be significantly higher. Closing now. |
Current implementation is about 60ms for a 10Mb stream on i7 processor.
|
The conversion is relatively simple. Hence, should be made a vector operation and not byte by byte read.
The text was updated successfully, but these errors were encountered: