Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106680
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: how to convert code that uses cmp to python3 |
| Date | 2016-04-08 16:52 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <87bn5kfbsq.fsf@elektro.pacujo.net> (permalink) |
| References | (3 earlier) <CAPTjJmrbL870mV1kU8nHar=bPyKZRmhKP-8iUs_tpYVo5vhhOA@mail.gmail.com> <57075F43.7060004@rece.vub.ac.be> <85fuuw5ypl.fsf@benfinney.id.au> <5707B2CE.1010407@rece.vub.ac.be> <mailman.81.1460122331.2253.python-list@python.org> |
Antoon Pardon <antoon.pardon@rece.vub.ac.be>: > Well having a list of 1000 Sequence like object. Each sequence > containing between 1 and 100 numbers. Comparing each sequence > to each other a 100 times. I get the following results. > > Doing it as follows: > seq1 < seq2 > seq2 < seq1 > > takes about 110 seconds. > > Doing it like this: > delta = cmp(seq1, seq2) > delta < 0 > delta > 0 > > takes about 50 seconds. Looks like a completely artificial scenario. Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: how to convert code that uses cmp to python3 Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-04-08 15:31 +0200
Re: how to convert code that uses cmp to python3 Marko Rauhamaa <marko@pacujo.net> - 2016-04-08 16:52 +0300
Re: how to convert code that uses cmp to python3 Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-04-08 16:22 +0200
csiph-web