You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is implemented via the pull API, which results in the introduction of a scope when converting the pull back to a stream (hidden inside of repeatPull in this case). However, we know that the pull in this case isn't doing any resource allocation so we can avoid the scope introduction and hence avoid the performance penalty entailed with a new scope.
We already have a way to convert from Pull to Stream without scope introduction (.streamNoScope). We could use this in our built-in pure combinators and we could introduce repeatPureNoScope defined as:
Consider the definition of
Stream#map
:where
repeatPull
is:This is implemented via the pull
API
, which results in the introduction of a scope when converting the pull back to a stream (hidden inside ofrepeatPull
in this case). However, we know that the pull in this case isn't doing any resource allocation so we can avoid the scope introduction and hence avoid the performance penalty entailed with a new scope.We already have a way to convert from
Pull
toStream
without scope introduction (.streamNoScope
). We could use this in our built-in pure combinators and we could introducerepeatPureNoScope
defined as:I suspect we'd get a significant performance boost from this. Thoughts?
The text was updated successfully, but these errors were encountered: