Looks like a case of two optimizations fighting for supremacy. It's difficult
to make general improvements when this kind of thing happens: optimizations
that help one program can often have adverse effects on another.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think that there is some inherent problem in taking decision to spool the
output
looking only at expression. In some cases like with sorting and grouping it's
enough
but in other cases an expression's consumer would better to decide whether
it wants to spool its input before the use.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to continue with a question about generator functions:
http://article.gmane.org/gmane.text.xml.xsl.general.mulberrytech/80053
Previously I've had a negative experience with this kind of functions:
but now, looking into the source, I've found that a little fix helps:
This is related to decided evaluation mode:
SHARED_APPEND_EXPRESSION or MAKE_CLOSURE.
You might want to address this case.
Looks like a case of two optimizations fighting for supremacy. It's difficult
to make general improvements when this kind of thing happens: optimizations
that help one program can often have adverse effects on another.
I think that there is some inherent problem in taking decision to spool the
output
looking only at expression. In some cases like with sorting and grouping it's
enough
but in other cases an expression's consumer would better to decide whether
it wants to spool its input before the use.