小编azz*_*ood的帖子

为什么我的程序使用Tie :: File运行得这么慢?

#!/usr/bin/perl
use strict;
use warnings;
use Tie::File;
use Data::Dumper;
use Benchmark;

my $t0 = Benchmark->new;

# all files in the current folder with $ext will be input.
# Default $ext is "pileup"
# if entered, second user entered input will be set to $ext
my $ext = "pileup";
if(exists $ARGV[1]) {
    $ext = $ARGV[1];
}

# open current directory & store filenames with $ext into @pileupfiles
opendir (DIR, ".");
my @pileupfiles = grep {-f && /\.$ext$/} readdir DIR;

my $dnasegment; …
Run Code Online (Sandbox Code Playgroud)

perl performance

3
推荐指数
1
解决办法
281
查看次数

标签 统计

performance ×1

perl ×1