in reply to Re: $var{el} += 1 vs $var{el} = $var{el} + 1
in thread $var{el} += 1 vs $var{el} = $var{el} + 1
Okay, so that begs a question - what is the impact on performance between:
$totalsHash{$resultHash{SomeKey}} = $resultHash{SomeKey}{AltValue};vice
my $resultKey = $resultHash{SomeKey}; $totalsHash{$resultKey} = $resultHash{$resultKey}{AltValue};
This is assuming I am referring to the SomeKey value multiple times. I would assume the second scenario is more efficient.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: $var{el} += 1 vs $var{el} = $var{el} + 1
by choroba (Cardinal) on Aug 13, 2013 at 14:58 UTC | |
|
Re^3: $var{el} += 1 vs $var{el} = $var{el} + 1 (Benchmark)
by Anonymous Monk on Aug 13, 2013 at 15:01 UTC |