Giter VIP home page Giter VIP logo

Comments (3)

meirbon avatar meirbon commented on July 21, 2024 1

Hey! Thanks! Nice to hear from you and I totally agree. I had actually been meaning to compare bvh libraries in Rust but just never really had the time. To be honest, my current benchmark isn’t very representative either (it just traces the same ray over and over) so I’m open to new ideas.

from rtbvh.

meirbon avatar meirbon commented on July 21, 2024

Okay, so I spend this weekend testing a fair bit and found these things:

  • Your AABB intersection code was faster than mine which I found interesting.
  • Using an iterator to traverse the bvh was up to 30% faster in most cases so I implemented that in my library as well, although I do not exactly understand why (maybe compiler optimizations?). The traversal code is very similar so it must be some weird iterator optimization that the Rust compiler is able to make.
  • My benchmark single ray app was not representative as I expected so I wrote a simple visualizer this morning and it gave me these numbers on a teapot:
bvh 0.5: ~45 MRays/s
rtbvh (spatial): ~66 MRays/s
rtbvh (spatial mbvh): ~94 MRays/s
rtbvh (binned sah): ~64 MRays/s
rtbvh (binned sah mbvh): ~91 MRays/s

Construction times for a teapot are as follows:

  • rtbvh spatial: 27.574 ms, 0.513 ms for its mbvh
  • rtbvh binned sah: 3.3 ms, 0.361 ms for its mbvh
  • bvh 0.5: 10.332 ms

I have not yet added packet traversal to the visualizer, that will be my next step :)

from rtbvh.

svenstaro avatar svenstaro commented on July 21, 2024

Interesting, thanks! Might be good to add this to your README or somewhere.

from rtbvh.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.