Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Dino Viehland
IronPython displays it when it starts up on the first line: "... on .NET 2.0.50727.3031" -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord Sent: Thursday, August 14, 2008 2:34 PM To: Discussion of IronPython Subject: Re: [IronPython] Performan

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Michael Foord
Curt Hagenlocher wrote: Can you tell us about the environment you're running these tests in? Most interesting are the specific OS and the version of mscorwks.dll. It's Win XP SP 3. What's the easiest way of telling you the specific version of mscorwks.dll? I'll get you more details from wor

Re: [IronPython] speed of ip compiled

2008-08-14 Thread Keith J. Farmer
Michael demonstrates a very good point: if the question is "perf?", the only useful answer is "experiment!". There are so many factors that go into it, down to the machine and the environment it presents, that it's generally quicker and more informative to write a simple program and take sev

Re: [IronPython] speed of ip compiled

2008-08-14 Thread Michael Foord
David Jensen wrote: I would like to know if I write python standard programs and compile them into an exe using IP1 or IP2, how much faster would it be than standard python. Also, how much faster is interpreted IP1 or IP2 than standard python running as an interpreter? Try it and find out

[IronPython] speed of ip compiled

2008-08-14 Thread David Jensen
I would like to know if I write python standard programs and compile them into an exe using IP1 or IP2, how much faster would it be than standard python. Also, how much faster is interpreted IP1 or IP2 than standard python running as an interpreter? David Jensen __

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Curt Hagenlocher
Can you tell us about the environment you're running these tests in? Most interesting are the specific OS and the version of mscorwks.dll. On Thu, Aug 14, 2008 at 9:41 AM, Michael Foord <[EMAIL PROTECTED]>wrote: > Just for fun I also compared with CPython. The results are interesting, > I'll tur

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Michael Foord
Dino Viehland wrote: BTW time.clock() is what I usually use to measure which works on both CPython and IronPython. On Ipy we use the .NET Stopwatch class which uses a high resolution counter if it's available. I was looking for operations that had got an order of magnitude slower or so -

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Seo Sanghyeon
2008/8/15 Dino Viehland <[EMAIL PROTECTED]>: > BTW time.clock() is what I usually use to measure which works on both CPython > and IronPython. On Ipy we use the .NET Stopwatch class which uses a high > resolution counter if it's available. This is what you should do. Python Library Reference sa

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Dino Viehland
BTW time.clock() is what I usually use to measure which works on both CPython and IronPython. On Ipy we use the .NET Stopwatch class which uses a high resolution counter if it's available. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord Se

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Curt Hagenlocher
On Thu, Aug 14, 2008 at 9:41 AM, Michael Foord <[EMAIL PROTECTED]> wrote: > Define newstyle (1 000 000): > IP1: 42047 > IP2: 20484 > Py: 23921 > Define oldstyle (1 000 000): 33% slower > IP1: 1781 > IP2: 2671 > Py: 2108 We're trying to encourage people to use new-style classes so

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Dino Viehland
Awesome information! I'll start taking a look through all of this and let you know what I can improve. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord Sent: Thursday, August 14, 2008 6:15 AM To: Discussion of IronPython Subject: [IronPython

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Michael Foord
Oh - plus it looks like exception handling is about 40% slower in IronPython 2: from System import DateTime class CustomError(Exception): pass def test(s): for i in xrange(10): try: raise CustomError('ow') except CustomError, e: pass return (

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Michael Foord
It looks like I've found the slowdown in our execution framework. It is caused by extra overhead in the IronPython engine API. If I created a compiled code object and execute it in a module with IronPython 1 a million times (code shown below) - it takes 1.5 seconds. The equivalent (please che

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Michael Foord
It looks like 2-3 seconds of the 5-6 seconds slowdown in dependency analysis is due to the way I resolved a weird cyclic import problem (one that we didn't have in IP1 but due to the spaghetti like imports in that part of our code I can't reproduce on its own with IP2). I moved an import into t

[IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-14 Thread Michael Foord
Hello all, I've ported Resolver One to run on IronPython 2 Beta 4 to check for any potential problems (we will only do a *proper* port once IP 2 is out of beta). The basic porting was straightforward and several bugs have been fixed since IP 2 B3 - many thanks to the IronPython team. The g