Perl脚本是system_info.pl:- Perl 5.10.1(RHEL 6.0)中的执行时间1.2s和Perl 5.8.8中的0.9s(RHEL 5.8)
Script is further breakdown and after analysis following are observations :
*Perl startup time -> increased
*Library loading -> increased
*Object creation -> no significant change
*Database processing -> no significant change
*System display -> no significant change
*Real time increased CPU time decreased.
*分解方法
`use Time::HiRes qw/ time sleep /;
use Time::HiRes qw(usleep nanosleep);
my $start = time;
.
code
.
my $end = time;
print 'above code block difference Time ', ( $end - $start ) ,`
Result is average of 10 iterations
我在red hat 5.8上编译了Perl 5.10.1并观察到性能上的微小变化b / w在RHEL 5.8上的Perl 5.8.8和5.10.1
这种退化背后的主要原因是什么?如何缩小分析以提升绩效?