On Wednesday, 24 June 2015 at 14:29:34 UTC, Adam D. Ruppe wrote:
On Wednesday, 24 June 2015 at 13:50:09 UTC, Vladimir Panteleev
- On the performance side, one point is that this grows the size of the struct by two machine words (string's .ptr and .length). This type is likely to be passed by value through function parameters, too.

Aye, that's a compromise again - it could just allocate a new string in that eager method, but since it is implicit, that could easily waste a lot more time than the extra cached string.

This would be a great opportunity for automatic caching by the compiler. `eager` is pure, after all.

Reply via email to