【发布时间】:2010-08-27 23:39:42
【问题描述】:
#test.pl
use Getopt::Long;
Getopt::Long::Configure ("bundling");
GetOptions ( 'TestB|B|b' => \$testb ,
'TestA|A|a' => \$testa, );
这是我的情况,我可以发泄perl test.pl -Ba
所以我使用Getopt::Long::Configure ("bundling");
因此,即使我尝试使用选项执行,我的程序也开始变慢
perl test.pl
有没有最好的方法来解决这个问题?
基准测试结果:
with Getopt::Long::Configure ("bundling");
real 0m6.101s
user 0m2.040s
sys 0m0.260s
Without Getopt::Long::Configure ("bundling");
real 0m3.019s
user 0m2.020s
sys 0m0.200s
【问题讨论】:
-
我不明白你的问题。您的程序以什么方式变慢?多少?你怎么知道的?
-
请显示准确的基准测试结果,表明情况始终如一。我的初始测试对性能没有影响