ä»äºã§ Benchmark ã¢ã¸ã¥ã¼ã«ã使ãæ©ä¼ããã£ãã®ã§ã使ãæ¹ï¼çµææ å ±ã®èªã¿åãæ¹ãã¾ã¨ãã¦ã¿ã¾ãããåºæ¬çã«ã¯ perldoc èªãã°ãªã¼ã«ãªãã±ã¼ã§ããï¼ã¨æã£ã¦ããã®ã§ãããdocs ã§ã¯çµææ å ±ã®èªã¿æ¹ã«ã¤ãã¦ã¯ããã¾ã触ãããã¦ããªãã£ãçºãã¬ãããªè£è¶³ãã¦ã¿ã¾ããã åºæ¬ ã¨ããï¼ç¨®é¡ã®ã³ã¼ãã®å®è¡é度ãæ¯è¼è¨æ¸¬ããã«ã¯ä»¥ä¸ã®ãããªã½ã¼ã¹ãè¨è¿°ãã¾ãï¼ bench.pl #!/usr/bin/perl use strict; use warnings; use Benchmark qw(timethese cmpthese); sub hogeLoop1 { my $str; for my $i (1 .. 10000){ $str .= $i } } sub hogeLoop2 { my $str; for my $i (1 .. 20000){ $str .= $i
{{#tags}}- {{label}}
{{/tags}}