ããã¤ãã®ã¹ã¯ãªããè¨èªã®å¦çç³»ã§ã¯ããªãã¸ã§ã¯ããçæãã¦å©ç¨ããå ´åã¨æ¯è¼ãã¦ãã¯ãã¼ã¸ã£ãçæããå ´åã®ãªã¼ãã¼ãããã大ããã¨ããåé¡ãç¥ããã¦ãã¾ããæè¿ãPerlã§ã¯ãã¼ã¸ã£ã使ãããå ´é¢ã«ééããã®ã§ããã³ããã¼ã¯ãã¨ã£ã¦ã¿ããã¨ã«ãã¾ããã çµæã以ä¸ã®ããã«ä¸¡è ã使ãã¢ããã¼ãã§å¤§ããªé度差ã¯ãªãã¨ãããã¨ãããã£ãã®ã§ã¡ã¢ã $ perl closure-vs-method.pl Rate method closure method 535/s -- -12% closure 609/s 14% -- $ cat closure-vs-method.pl use strict; use warnings; use Benchmark qw(cmpthese); my $COUNT = 1000; sub doit_closed { my $cb = shift; $cb
{{#tags}}- {{label}}
{{/tags}}