The whole idea is that you can range over functions themselves without additional wrapper types. You only need iter.Pull and iter.Pull2 when you plan to store the iterable between iterations (stateful iterator). Otherwise, you are just losing performance for context switches.
The whole idea is that you can range over functions themselves without additional wrapper types. You only need
iter.Pull
anditer.Pull2
when you plan to store the iterable between iterations (stateful iterator). Otherwise, you are just losing performance for context switches.Benchmarks on my Mac M1 before applying changes:
After the changes:
The loss of speed it still there, but now it's around 1.5 to 2 times.