Thank you, that explains it.
I was mostly curious on whether it would be faster with this style since I've seen improvements when switching from for-loops to iterators before. Here are the results after fixing the issue.
npv_loop time: [37.386 ns 37.756 ns 38.144 ns]
change: [-5.9059% -4.1864% -2.4736%] (p = 0.00 < 0.05)
Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild
npv_func time: [36.751 ns 37.007 ns 37.273 ns]
change: [-2.7829% -1.6237% -0.4495%] (p = 0.01 < 0.05)
Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild