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:
represent the building in a numba-friendly format, e.g. tuple of arrays (points, faces, polygons, walls, solids, zones),
rewrite the ray simulation as a numba function.
I should try to:
keep the current high level interface (because a lot is already done: saving results, plotting, rendering movie).
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: