[ruby-core:80410] Re: [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch

From: Eric Wong <normalperson@...>
Date: 2017-03-27 19:00:54 UTC
List: ruby-core #80410
normalperson@yhbt.net wrote:
> https://bugs.ruby-lang.org/issues/13355
> 
> This is similar in spirit to opt_case_dispatch as the literal
> Range here is guaranteed to be immutable when used for
> checkmatch.

Along with the current behavior of using putobject instead of
putstring for literal strings, when there are non-literals.

Anyways, this only puts extra code into compile.c (not insns.def),
so it has less negative impact at runtime.

I will commit this in a few days if no response.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread