in reply to Re^2: Any downsides to this slurp idiom?
in thread Any downsides to this slurp idiom?
That sounded plausible, but I just tried it on 5.22 with these results, using this code in my repl:
{ my $s; do{ local( @ARGV, $/)='1gb.db'; $s = <> }; <STDIN>; my $t = do{ local( @ARGV, $/)='1gb.db'; <> }; <STDIN> };;
Note how the first bump in the memory to 1.2GB remains at that level after the first burst of IO finishes,
It then climbs to 2.4GB for the second burst of IO, and then climbs again to 3.5GB immediately the IO stops.
Ie. When the temporary buffer within the do block is copied into the target scaler $t.
(Perhaps the IsCOW only operates on *nix? (I'm on win.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Any downsides to this slurp idiom?
by vr (Curate) on Jun 22, 2018 at 23:03 UTC | |
by BrowserUk (Patriarch) on Jun 23, 2018 at 01:09 UTC |