in reply to Re: RE on lines read from in-memory scalar is very slow
in thread RE on lines read from in-memory scalar is very slow
This code doesn't make any difference on the relative times on the windows 11/cygwin system. If I count the lines in the original code they are the same for both. The efficiency of populating a scalar from a file is important in general, but not really relevant to the problem here.
my $s = do { local $/; <$fh>; };
A couple of additional pieces of info. I did 100k random seeks on the disk file and the memory file and the times were about the same. When the code is running with regex loop, it seems CPU limited.
|
|---|