Issue #12403 has been updated by Yui NARUSE.


Sam Saffron wrote:
> Naruse, I see this was reverted? any way to get rb_scan_args inlined it would be beneficial everywhere. 

Reverted and reapplied at r55110.

----------------------------------------
Feature #12403: Optimise Regexp#match?
https://bugs.ruby-lang.org/issues/12403#change-58827

* Author: Sam Saffron
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
At the moment `#match?` is dynamically dispatched and args are walked. 

Instead

- Add 2 insns instructions for #match? with 1 param and #match? with 2 params
- Amend parser to route #match?("s") and #match?("s", 1) to insns version

Main reason for `#match?` is performance, might as well make it as fast as possible. 



-- 
https://bugs.ruby-lang.org/

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