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

C++: Simple SIMD / SoA experiment #7

Merged
merged 5 commits into from Apr 10, 2018

Conversation

Projects
None yet
1 participant
@aras-p
Owner

aras-p commented Apr 10, 2018

  • Let's try to use SSE for the float3 struct, i.e. the "baby's first SIMD" approach :)
  • Play around with SoA layout for all sphere data
  • Play around with compiler settings wrt floating point math

PC: 135 -> 186 Mray/s
Mac: 38.7 -> 49.8 Mray/s

Largest win is not from SSE float3, but from: 1) SoA layout of sphere data and 2) on MSVC, fp:fast setting.

aras-p added some commits Apr 10, 2018

simd: use vectorcall on MSVC, change more functions to pass float3 by…
… value instead of by const ref

- PC 134 -> 131 Mray/s
- Mac 44.2 -> 44.3 Mray/s
simd: enable "fast" math compiler setting
- PC 131 -> 171 (!) Mray/s
- Mac 44.3 -> 42.6 Mray/s
simd: have a "structure of arrays" layout for all spheres data, chang…
…e HitSphere -> HitSpheres

- PC 171 -> 184 Mray/s
- Mac 42.6 -> 48.1 Mray/s
simd: put squared radius into SoA data
- PC 184 -> 186  Mray/s
- Mac 48.1 -> 49.8 Mray/s

@aras-p aras-p merged commit f420cec into master Apr 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment