| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…s.update_from_data_y tweak
|
CI failures are unrelated, merging |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR summary
For large wireframe plots (in my testing, 8000x8000), a large chunk of time is spent doing autoscaling of the axes. There is some opportunity to vectorize these calculations and get speedups.
Changes here:
The compiled function update_path_extents is actually just about equal with a vectorized numpy approach speedwise when updating both x and y limits. But when doing single axis limits, it needs to check for NaNs for each pair of x or y, so the numpy approach lets you skip the extra x or y calculations and comes out ahead. This bit is a benefit for all 3D functions, not just plot_wireframe. I spent some time trying to refactor the compiled function to operate on just a single axis, but it's tricky to disentangle x and y. The numpy approach was easier and just as fast.
For my test case I'm seeing an average over 5 runs on main of 6.82 seconds, and on this PR 4.00 seconds - a 1.7x speedup.
Plotting and drawing on main (avg 6.82 sec):

Plotting and drawing on this PR (avg 4.00 sec):

PR checklist