[Yum-devel] [PATCH] clean up misc.to_xml(), make it faster, add tests. BZ 716235.
James Antill
james at fedoraproject.org
Fri Nov 16 17:45:29 UTC 2012
On Fri, 2012-11-16 at 12:17 -0500, Zdenek Pavlas wrote:
> Hi,
>
> > type checking is better done with isinstance
>
> isn't "type() is" significantly faster?
In my test changing your patch to use isinstance() dropped about a
second from the time (don't ask me why, I just work here).
> > unicode('item', 'utf-8') was a runaway winner.
>
> Didn't know that, Thanks!
Dito. This also dropped about a second :-o
After the three changes (isinstance, utf-8 and apos): 30.589
More information about the Yum-devel
mailing list