-
Notifications
You must be signed in to change notification settings - Fork 10
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
add support for intel crc32 instruction #5
Comments
also the amd instruction (see same link) |
some links: cloudflare patches: intel patches: and finally: |
thanks; i'm trying to find out how to call assembly from julia... |
I did some digging, and this seems to work: crc32(crc::Int32, x::Int32) =
Base.llvmcall(("declare i32 @llvm.x86.sse42.crc32.32.32(i32, i32)",
"""%3 = call i32 @llvm.x86.sse42.crc32.32.32(i32 %0, i32 %1)
ret i32 %3"""), Int32, Tuple{Int32,Int32}, crc, x)
crc32(Int32(0), Int32(1)) (I haven't checked whether the result is correct, but it gives me an answer without complaining at least.) |
oh wow. thanks. tbh i don't think i ever got to the point where i understood how to use it... i will need to read the technical note again. but if you feel like posting a patch, that would be awesome! |
Will be gone for the next few days, but let me know if you can't figure it out. Note that there are related instructions that take inputs of different widths, IIRC. |
In Julia 0.6, you can just call |
Ping: now that 0.6 is almost out, you might want to call |
see https://crc32c.angeloflogic.com/performance/
The text was updated successfully, but these errors were encountered: