ssz
ssz copied to clipboard
Replace iterables throughout
Using the iterable interface instead of Arrays is much slower, even a for of
of an array is slower than a simple for(;;)
iterating over an array.
Since ssz is a low level library, meant to be used in higher-performance applications (such as Lodestar), we need to squeeze as much performance as possible.
There's still some iterator nonsense in ssz that should be removed:
- use of
iterateAtDepth
, not to be confused withTree#iterateNodesAtDepth
which is resolved with #167, needs agetGindicesAtDepth
alternative - use of generator functions in public interface, needs an array alternative, can be introduced in a non-breaking change