mailapply


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Chris MacRaild on October 16, 2006 - 11:13:
The discussions of relax performance on relax-users
https://mail.gna.org/public/relax-users/2006-10/msg00024.html reminded
me of something I noticed recently and forgot to mention here. There are
several instances in relax where the apply() built-in function is used.
According to the Python Library Reference, apply(func, args, kwds) is
exactly equivalent to the extended call syntax: func(*args, **kwds). For
this reason apply has been deprecated since Python 2.3. In some very
quick and inexhaustive tests, I found replacing apply with func(*args,
**kwds) in relax to work, and indeed to give a significant performance
improvement (perhaps as much as 20%).

So, a couple of questions:
Is there a reason for sticking with the apply syntax that I've missed?
Can we efficiently test the replacement to ensure no subtle breakages?
Edward, at some point you mentioned the idea of high-level testing based
on the extensive back-calculated data you have. How much work would be
involved in getting that going?


Chris




Related Messages


Powered by MHonArc, Updated Thu Oct 26 18:21:28 2006