[ruby-core:70049] Re: [Ruby trunk - Feature #11375] [Open] Decreased Object Allocation in Pathname.rb

From: Eric Wong <normalperson@...>
Date: 2015-07-20 03:08:45 UTC
List: ruby-core #70049
Looks like you sent a backwards patch.  We will need to use -R with
patch/git-apply to apply the patch.

Relying on "literal".freeze in "when" statements is pointless,
case_when_optimizable_literal in compile.c already does that for us :)

Other than that, the rest of the (reversed) patch seems mostly alright,
do you have benchmarks?

Anyways, I tried making this more automatic last year (for common ops
such as <<, ==, !=, +, etc) but we did not find significant improvements
across the board:

  https://bugs.ruby-lang.org/issues/10423 + [ruby-core:66127]

In This Thread