[ruby-core:75628] [Ruby trunk Feature#12403] Optimise Regexp#match?

From: sam.saffron@...
Date: 2016-05-20 00:43:23 UTC
List: ruby-core #75628
Issue #12403 has been reported by Sam Saffron.

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

* 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>

In This Thread

Prev Next