Dave
[EMAIL PROTECTED] wrote:
Send users mailing list submissions to
users@lists.ironpython.com
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of users digest..."
Today's Topics:
1. Sin and Sqrt performance (Chris Trimble)
----------------------------------------------------------------------
Message: 1
Date: Mon, 17 Apr 2006 11:47:35 -0700
From: "Chris Trimble" <[EMAIL PROTECTED]>
Subject: [IronPython] Sin and Sqrt performance
To: "Discussion of IronPython"[EMAIL PROTECTED]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
IP doesn't do much better than CPython when using math.sin and
math.sqrt. However, same test in C# dominates (10ms.. as opposed to
upwards of 5 seconds in IP or CPy). Am I missing something here?
Thanks,
- Chris
-----------------------------------
import time
from math import *
def do_timing(f, reps):
start = time.time()
f(reps)
end = time.time()
print "%s (%d reps): %f" % (f.__name__, reps, end-start)
def py_fpfunc_test(reps):
j = 0.0
for i in range(0, reps):
j += sin( j )
j += sqrt( j )
j +=2.72392032032;
print j
def do_all_timing():
do_timing(py_fpfunc_test, 5000000)
do_all_timing()
print ""
------------------------------
_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
End of users Digest, Vol 21, Issue 18
*************************************
[EMAIL PROTECTED]>
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
_______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com