From: sam.saffron@... Date: 2016-05-22T21:50:15+00:00 Subject: [ruby-core:75678] [Ruby trunk Feature#12403] Optimise Regexp#match? Issue #12403 has been updated by Sam Saffron. Naruse, I see this was reverted? any way to get rb_scan_args inlined it would be beneficial everywhere. Nobu, keep in mind your test is looking at 100% hit rate on global method cache, if match? is evicted due to global method cache being open benefit will be greater. I think this is a great change and hope you can merge in (also =~ is in insns afaik anyway so this add parity) ---------------------------------------- Feature #12403: Optimise Regexp#match? https://bugs.ruby-lang.org/issues/12403#change-58810 * 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: