Skip to content
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

Further collider optimizations #982

Open
pca006132 opened this issue Oct 10, 2024 · 2 comments
Open

Further collider optimizations #982

pca006132 opened this issue Oct 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@pca006132
Copy link
Collaborator

Just some ideas for optimization:

  1. Wide BVH: The standard BVH (and in our current implementation) uses binary trees. We can use n-ary trees (for n = 4/8) instead to make the tree shallower and reduce the number of jumps, similar to a B-tree. (there are papers on this, e.g. https://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.100/institut/Papers/QBVH.pdf)
  2. Reduce precision: While we use double precision coordinates, it may be worth it to use single precision floats for our BVH for smaller memory footprint and better performance. As long as we make sure it is overapproximating, i.e. round up/down for max/min, and maybe account for epsilon, it should be safe and will give us better performance for the general case. For the rare cases that exceed single precision floating point range, we can just always treat that as colliding, I don't think users use that anyway.
  3. Maybe try AVX for bounding box overlap check. This may improve performance.
@pca006132 pca006132 added the enhancement New feature or request label Oct 10, 2024
@elalish
Copy link
Owner

elalish commented Oct 10, 2024

What is AVX?

@pca006132
Copy link
Collaborator Author

https://en.wikipedia.org/wiki/Advanced_Vector_Extensions

aarch64 has neon, but it would be harder for me to test that, have to pull out my minipc for that (running aarch64).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants