This is a Benchmark in Perl about bignum :
1 2 3 4 5 6 |
use Benchmark qw(:all) ; cmpthese(-1, { 'dev' => sub {my($x,$y) = (4,3); $x = $x/$y;}, 'bignum' => sub {my($x,$y) = (4,3); use bignum; $x = $x/$y;}, }); |
Our result:
1 2 3 |
Rate dev bignum dev 4670926/s -- -11% bignum 5224717/s 12% -- |
We see the cost is about 12% performance, so if its not really necessary we should tun this feature off.
Pretty nice post. I just stumbled upon your blog
and wanted to say that I have truly enjoyed surfing around your blog posts.
After all I will be subscribing to your rss feed and I hope you write again very soon!