[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Poor man's benchmarking issue - help needed
- From: TNHarris <telliamed@...>
- Date: Wed, 31 Aug 2011 05:32:08 -0400
Lorenzo Donati <lorenzodonatibz@interfree.it> wrote:
>
>According to the following benchmarks, built-in math.floor and
>math.ceil
>are slower than their counterpart rewritten using the core % operator!
>
Partly because you're measuring table lookups. Alias math.floor and math.ceil to locals and the times I get go from 40% slower to just 25% slower.
Also, that ce2 function is wrong when x%1 equals 0.
--
tnharris
telliamed@whoopdedo.org