HackerTrans
トップ新着トレンドコメント過去質問紹介求人

verglasz

no profile record

コメント

verglasz
·4 か月前·議論
Sounds like the cost isn't really in the abstraction, but in implementing a traversal of the merge tree which produced one value at a time instead of creating a batch with what is presumably fewer total wasted computations... I doubt that they'd have had better codegen if they inlined their `next()` into the loop consuming the values. And vice versa, probably an `Iterator` for the merge tree that internally produces a batch and then yields from it would probably perform pretty much the same as their current code (since it's thin enough to be inlined I expect).