From: Eric Wong Date: 2014-10-07T01:19:08+00:00 Subject: [ruby-core:65449] Re: [ruby-trunk - Feature #10326] [Open] [PATCH] optimize: recv << "literal string" normalperson@yhbt.net wrote: > Future optimizations: > > * recv << "interpolated #{dstr}" > (immediate free + force recycle) Tried, not worth it from what I can tell: http://80x24.org/spew/m/7c7dd29f45920fb8fc9d2c72858334c60e0a9c58.txt (however, a good learning experience for me) > * elide allocation for equality comparisons: > str == "literal" and "literal" == str See [Feature #10329] and [Feature #10333] > * optimize << recv is IO << (str|dstr) (maybe) I doubt it's worth the effort because of syscall overhead. This (#10326) is fairly minor compared to the "==" optimizations in #10329 and #10333