This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tracking memory leaks: | |
Devel::Arena - sv_stats() returns arena structures used for SV allocation | |
* Devel::Cycle - find_cycle($ref) returns all cycles found in $ref and the perl variables they point to | |
Devel::Gladiator - walk Perl variable arena | |
Devel::Leak - deprecated by Devel::LeakTrace::Fast | |
Devel::LeakTrace - deprecated by Devel::LeakTrace::Fast | |
* Devel::LeakTrace::Fast - prints leaked SV's and line numbers at END. | |
Data::Structure::Util - has_circular_ref($ref) returns ref to link in $ref that is circular or false. | |
Test::LeakTrace - no_leaks_ok(), etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use Benchmark qw/cmpthese/; | |
use strict; | |
my @array = ( 'a', 'a', 'a', 'b', 'c', 'd', 'e', 'g', 'e', 'e', 'g', 'c' ); | |
sub uniq_v1 { | |
my %tmp; | |
my @new_array = grep { |