-
Notifications
You must be signed in to change notification settings - Fork 435
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
Non-SIMD math instructions are missing. #344
Comments
For reference, I PR'd this in vg-renderer to work around this issue, and overall improve performance: jdryg/vg-renderer#43 |
Code you're talking about is here: Lines 768 to 780 in 8e9a998
SIMD implementation here: Lines 718 to 736 in 8e9a998
You need to load Ideally for vg-renderer SIMD functions in your PR you should call bx SIMD stuff, instead SSE intrinsic directly. |
I was looking at some performance metrics coming from
vg-renderer
, and it's spending a conciderable amount of time invg::vec2Dir
for example. Looking into the calculations of that, I saw that it calls tobx::rsqrt
, which seems like 100% the correct thing to do:However,
bx::rsqrt()
does not have an implementation mapping to_mm_rsqrt_ss
for x64 (SSE).There is a mechanism that splats the value over the whole vector and compiles in a
_mm_rsqrt_ps
and then extracts one elements, which I'd consider wasteful, and prevents the compiler, or micro-architectures from potentially vectorizing this.So, I'm thinking: those functions are missing? But I see that they don't really have a place right now, as all of the files are named
simd_xxx
, and this is an example of a non-SIMD instruction.The text was updated successfully, but these errors were encountered: