Perl multiplication vs. division Benchmark

Today I want to compare the multiplication and division operation in Perl both could do the same, as example “100*2” is the same as “100/0.5”. And “100*0,5” is the same as “100/2”. Now let’s see what’s the Benchmark says:

We see in bout cases the multiplication is much faster:

To change the divisor to a factor calculate : factor = 1/divisor.This could be also useful if you have the same divisor for some calculations.

One thought on “Perl multiplication vs. division Benchmark”

Leave a Reply

Your email address will not be published.

nine + four =