krzysztofarendt / building3d

Towards 3D building modeling and simulation
MIT License
20 stars 2 forks source link

Rewrite Rays into numba-friendly functions #66

Closed krzysztofarendt closed 1 month ago

krzysztofarendt commented 2 months ago

The current implementation of geometric calculations in Numba (https://github.com/krzysztofarendt/building3d/pull/64) did not bring satisfactory performance improvements, because the main simulation loop is still written in Python and each Ray is a separate object. Numba code is used only during initialization (e.g. finding transparent surfaces - the ones that separate two solids within the same zone) and for reflections (finding how far a ray is from a surface). The current code is approximately 2x faster than Python-only code. I expected more like a 10x improvement.

I need to:

I should try to: