SmylerMC / litemapy

Litemapy's goal is to provide an easy to use way to read and edit Litematica's schematic file format
GNU General Public License v3.0
52 stars 6 forks source link

speed up getblockcount using numpy #33

Closed llGaetanll closed 10 months ago

llGaetanll commented 10 months ago

Using numpy's count_nonzero is faster than iterating with python loop!

I've found getblockcount to be quite slow when working with large schematics. Using numpy speeds it up for free.