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. :-)
In my (brief) benchmarking, nearly half of the time is spent in
sort_cols()
. It turns out you can usenp.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. :-)