File: cpucache.pl

package info (click to toggle)
libdevel-nytprof-perl 6.04%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,552 kB
  • ctags: 1,540
  • sloc: perl: 5,590; ansic: 107; makefile: 21
file content (20 lines) | stat: -rw-r--r-- 232 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20


my $subref = sub { return };

for my $i (1..100_000) {

    some_expensive_sub();

    $subref->();
    $subref->(); # identical but faster!

    1; # loop
}

sub some_expensive_sub{

    my @x = (1000..1010);
    m/x/ for @x;

}