[Chandler-dev] Re: [commits] (heikki) [14591] Minor performance
improvements:
Heikki Toivonen
heikki at osafoundation.org
Wed Jun 6 10:12:39 PDT 2007
D John Anderson wrote:
> While I'm in favor of faster code, and I don't dispute that these
> changes make things faster, I'm curious if they result in any measurable
> or noticeable improvement.
I didn't do exact measurements on all of the changes, but at least one
of the rect.Get() changes improved one test on Linux by about 0.5%.
Also, I only looked at len() calls that showed in the top 100 cumulative
call stacks for the tests, which there weren't that many (i.e. easy fix,
wanted to do also partly to put some examples into the code).
So overall I expect the effect to be 1% or less for any test, but
noticeable at least when looking at profiles.
> I think the if __debug__ can be removed, since asserts only happen when
> __debug__ is True.
Yes, I've done so. Bryan also pointed this out. I mixed assert with
logger.debug() calls which can be expensive.
--
Heikki Toivonen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/chandler-dev/attachments/20070606/ca754d05/signature.pgp
More information about the chandler-dev
mailing list