What is the CORE:match (opcode) subroutine in Perl profiling?
perl, profiling, subroutine
Solution
`CORE:match` is a call to a regular expression -- in this case, within your `GeneModel` package.
For example, if we profile this script, Devel::NYTProf reports 1000 calls to `Foo::CORE:match`.
use strict;
use warnings;
package Foo;
my $s = 'foo foo';
$s =~ /foo/ for 1 .. 1000;
Problem
I previously wrote some utilities in Perl, and I am now rewriting them in order to give some new/better features. However, things seem to be going much more slowly than in the original utilities, so I decided to run one with the NYTProf profiler. Great profiler btw, still trying to figure out all its useful features. So anyway, it turns out that 93% of my program's time is being spent on calls to the `GeneModel::CORE:match (opcode)` subroutine, and I have no idea what this is. Most Google hits point to NYTProf profiles others have posted. I indeed wrote the `GeneModel` class/package, but I don't know what this subroutine is, why it was called so many times, or why it's taking so long. Any ideas?