Closed ToBinio closed 1 year ago
I've not looked closely, but your performance difference may be down to the raw loops only taking a reference to the block in the palette, whereas the iterator clones the block, which will involve cloning a string.
Oh. Wow i did not expected that to make such a big difference... new times:
change of plans #79
I tried creating a
chunk-block-iter
and honestly struggelt... but i finaly got a pretty stupid version running for theCurrentJavaChunk
... but the performance is questionable.just a small warning this code is a mess. Dont worry it well get better.
iter-chunk-blocks.rs
is a small exmaple (currently test) file. It containes 3 simple loops and messures very simple the performance. times on my machine with --releasechunk_block_iter.rs
contains 2 Iteratorstry_iter_indices()
block(x, y, z)
i dont know if i am using rusts Iterator Trait wrong but it feels like the performance overhead is to big.
maby i am also missing some major point to improve iter var1.