[IronPython] Sin and Sqrt performance (Chris Trimble)

Chris Trimble trimble at pobox.com
Tue Apr 18 01:57:20 CEST 2006


On 4/17/06, Dino Viehland <dinov at exchange.microsoft.com> wrote:
> I wonder if Boo could have optimized away the entire loop
> (in theory they could notice the calls into Math and optimize those)...
>  Note the 4ms is basically equal to zero because the precision
> of DateTime.Now isn't very good.

Oh blah!  I knew something was up here...  I totally messed up my
ticks conversion to ms.  A tick is 100ns, so it should be divide by
10k, not 1m.

New stat:  IP = ~5.5 seconds.  Boo = ~450ms.  C# = ~1.15s.

I added a modulo print of i every 1m in the Boo loop to make sure it
was doing the work.  And the end result of j is printed, so hopefully
it's doing something other than optimizing the loop out completely.

 - Chris



More information about the Ironpython-users mailing list