navis-org / sparse-cubes

Marching cubes for sparse matrices
GNU General Public License v3.0
4 stars 1 forks source link

Small tweaks #1

Closed stuarteberg closed 2 years ago

stuarteberg commented 2 years ago

In my (brief) benchmarking, nearly half of the time is spent in sort_cols(). It turns out you can use np.lexsort() for that, which is 1.5-2x faster, reducing overall mesh generation time by ~25%.

The other commit here is pretty minor. It shaves off ~1% of the overall execution time. :-)

schlegelp commented 2 years ago

Thanks! Nice catch with lexsort!