On Fri, Apr 8, 2016 at 5:35 PM, Antoon Pardon <antoon.par...@rece.vub.ac.be> wrote: > Op 08-04-16 om 00:21 schreef Chris Angelico: >> On Fri, Apr 8, 2016 at 6:56 AM, Antoon Pardon >> <antoon.par...@rece.vub.ac.be> wrote: >>> That solution will mean I will have to do about 100% more comparisons >>> than previously. >> Try it regardless. You'll probably find that performance is fine. >> Don't prematurely optimize! >> >> ChrisA > > But it was already working and optimized. The python3 approach forces > me to make changes to working code and make the performance worse.
Is performance actually worse because you're doing two comparisons? Visibly worse? If so, you probably have an overly-complex comparison function, and a tree is *always* going to be suboptimal. Have you actually measured a performance hit? ChrisA -- https://mail.python.org/mailman/listinfo/python-list