[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...

Issue #10333 has been updated by Koichi Sasada.

9 messages 2014/10/07

[ruby-core:65449] Re: [ruby-trunk - Feature #10326] [Open] [PATCH] optimize: recv << "literal string"

From: Eric Wong <normalperson@...>
Date: 2014-10-07 01:19:08 UTC
List: ruby-core #65449
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

In This Thread

Prev Next