Project

General

Profile

Actions

Feature #12403

open

Optimise Regexp#match?

Added by sam.saffron (Sam Saffron) almost 8 years ago. Updated almost 8 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:75628]

Description

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.


Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #12306: Implement String #blank? #present? and improve #strip and family to handle unicodeOpenmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0