Complex Iterators Are Slow
Complex Iterators are Slow Thursday, 31 July 2025 Timi, my pure JavaScript B-Tree, achieves best in class iteration speed in part because I replaced Iterators with callbacks. They might be convenient, but the design of JavaScript Iterators is inherently slow for complex iteration as it prevents your compiler from inlining code. Inlining is when the call site of a function is replaced with its body to avoid the overhead of a function call. So, this: function add(a, b) { return a + b; } for (