Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106659 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2016-04-08 17:40 +1000 |
| Last post | 2016-04-08 17:40 +1000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: how to convert code that uses cmp to python3 Chris Angelico <rosuav@gmail.com> - 2016-04-08 17:40 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-04-08 17:40 +1000 |
| Subject | Re: how to convert code that uses cmp to python3 |
| Message-ID | <mailman.70.1460101211.2253.python-list@python.org> |
On Fri, Apr 8, 2016 at 5:35 PM, Antoon Pardon <antoon.pardon@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.pardon@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
Back to top | Article view | comp.lang.python
csiph-web