[IronPython] IronPython 1.0 Beta 5
Anthony Tarlano
mailinglist.account at gmail.com
Fri Mar 31 12:07:09 CEST 2006
Dino,
Great job on improving the performance!!!!
IronPython is now faster then CPython running overhead.py
After Beta 5:
=========
CPC220# python.net overhead.py
LOOP TIME: 0.460693359375
THREAD TIME: 0.590881347656
CPC220# IronPythonConsole overhead.py
LOOP TIME: 0.460670471191
THREAD TIME: 0.590873718262
----------------------------------------------------------
# overhead.py
import time
TIMES = 100000
threads = list()
def stringops():
for n in xrange(TIMES):
s = "Mary had a little lamb"
s = s.upper()
s = "Mary had a little lamb"
s = s.lower()
s = "Mary had a little lamb"
s = s.replace('a','A')
def scheduler():
for n in xrange(TIMES):
for thread in threads: thread.next()
def upper():
while 1:
s = "Mary had a little lamb"
s = s.upper()
yield None
def lower():
while 1:
s = "Mary had a little lamb"
s = s.lower()
yield None
def replace():
while 1:
s = "Mary had a little lamb"
s = s.replace('a','A')
yield None
if __name__=='__main__':
start = time.clock()
stringops()
looptime = time.clock()-start
print "LOOP TIME:", looptime
threads.append(upper())
threads.append(lower())
threads.append(replace())
start = time.clock()
scheduler()
threadtime = time.clock()-start
print "THREAD TIME:", threadtime
On 3/31/06, Dino Viehland <dinov at exchange.microsoft.com> wrote:
>
>
>
> Hello IronPython Community,
>
>
>
> We have just released IronPython 1.0 Beta 5. This release focuses primarily
> on improving IronPython's performance. In this area we've reduced working
> set and startup type by optimizing methods on-demand, improved the speed of
> attribute access, reduced the overhead in many basic operations (e.g.
> equality checks and uninitialized checks for local variables), and done
> other various fine tuning. As usual there are also a good number of bug
> fixes (primarily focused on community reported bugs). There was also one
> significant API change in the .NET <-> Python interoperability area:
>
>
>
> If we have the following definitions:
>
>
>
> public class Foo {
>
> public void Bar(int arg) {}
>
> public void Bar<T>(int arg) {}
>
> }
>
>
>
> We can call the non-generic version with any of:
>
> foo.Bar(1)
>
> foo.Bar.__overloads__[int](1)
>
>
>
> And the generic one with any of:
>
> foo.Bar[str](1)
>
> foo.Bar.__overloads__[int][str](1)
>
> foo.Bar[str].__overloads__[int](1)
>
>
>
> This is different from previous versions of IronPython where indexing was
> used to provide access to generic methods.
>
>
>
> A more complete list of changes follows at the end.
>
>
>
> You can download the release from:
> http://www.microsoft.com/downloads/details.aspx?FamilyID=e4058d5f-49ec-47cb-899e-c4f781e6648f&displaylang=en
>
>
>
> We'd like to thank everyone in the community for your bug reports and
> suggestions that helped make this a better release: Aaronm, Anthony Tarlano,
> Eugene Rosenzweig, Shigeru Hemmi, JoeSox, John Platt, Klaus Müller, Lewis
> Franklin, Pete Sheill, Rusty Deschenes, and Sanghyeon Seo.
>
>
>
>
>
> Thanks and keep in touch,
>
> The IronPython Team
>
>
>
>
>
> More complete list of changes and bug fixes:
>
> ============================================
>
> ReflectOptimize methods on-demand
>
> ReflectOptimize hasattr/getattr/setattr and other context aware methods
>
> Improve BigInteger parsing performance
>
> abs(True) and abs(False) fixed to match CPython behavior
>
> os('stat') sets file modes properly now
>
> Bugfix: Setting variables in nt.environ doesn't propagate to environment
>
> Bugfix: Improve constructing files from streams
>
> ReflectOptimizer inlines type checks for non-convertible types
> (ICallerContext & UserType)
>
> Optimize uses of Ops.IsTrue(Ops.Equal(… )) to Ops.EqualRetBool to avoid
> boxing & conversions
>
> Support binding to generic .NET methods and move manual overload resolution
> __overloads__ dictionary
>
> Use data flow analysis to avoid Uninitialized checks where possible in
> locals
>
> Optimize generator.next calls to get good performance
>
> Bugfix: IronPython CodeDom cannot round trip 2 buttons on a form
>
> Improve performance of constructing commonly used built-in types
>
> FunctionEnvironment performance improvements
>
> Minor tweaks to casting orders
>
> Avoid TLS where possible in repr
>
> Bugfix: from __future__ import division doesn't flow into eval in some cases
>
> Bugfix: hasattr raises
>
> Bugfix: need to implement nt.startfile
>
> Bugfix: subclassing Tuple not working
>
> Bugfix: fix resource definitions in generated files
>
> Large namespaces use binary search to find attributes
>
> Bugfix: -i option doesn't go interactive when exception is raised
>
> SuperConsole now supports Ctrl_C handling as well as basic console
>
> Bugfix: '%02d' % 12 appends a leading zero
>
> Attribute access re-written for significant performance gains
>
> Bugfix: nt module doesn't implement chdir
>
> ReflectedPackage's delay load all type loads
>
> Bugfix: atxexit doesn't work
>
> Bugfix: IP: Cannot use a class from IronPython generated class libraries
>
> Bugfix: Cannot delete variable referenced in nested scope
>
> Bugfix: Support special method names (__int__, __pos__, etc…)
>
> Bugfix: Support for generic & non-generic types of the same name in same
> namespace
>
> Bugfix: __doc__ strings should reflect how we mangle calling conventions
>
> Bugfix: Update makefiles to include new assembly references
>
>
>
>
>
>
>
>
>
>
>
> Do you want to help develop Dynamic languages on CLR?
> (http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)
>
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
More information about the Ironpython-users
mailing list