in reply to Is it File::Map issue, or another 'helpful' Perl regex optimization?

Hi

Its neither,

That is to say, you can't tell what it is, or what its supposed to be

Consider https://metacpan.org/source/LEONT/File-Map-0.64/examples/fastsearch.pl, it uses https://metacpan.org/pod/File::Map#*-advise-$lvalue,-$advice

  • Comment on Re: Is it File::Map issue, or another 'helpful' Perl regex optimization? (neither)

Replies are listed 'Best First'.
Re^2: Is it File::Map issue, or another 'helpful' Perl regex optimization? (neither)
by vr (Curate) on Mar 18, 2017 at 00:15 UTC

    Adding advise( $s, 'sequential' ); made no difference :( - I mean, in terms of consumed memory.

      :)

      the module seems vague on claims and evidence, but ,

      I just did some testing, and I get these numbers just loading a 51mb file I create

      You'll need memusage-workingset-virtualmemory.pl to run it yourself

      So, when you map, seems to signal to the OS this is how big the memory usage is going to go (WVM field), and then the working set slowly increases up to the size of the file as the regular expression advances through the whole file "line" by line

      Is this faster than something else? More memory efficien? I dunno

      I'm beginning to suspect this is how File::Map is supposed to work

        Thank you, I'll digest this for a while