A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-May/014827.html below:

[Python-Dev] Comparison speed

[Python-Dev] Comparison speed [Python-Dev] Comparison speedMartin v. Loewis martin@loewis.home.cs.tu-berlin.de
Wed, 16 May 2001 10:02:01 +0200
> Since that's the exact opposite of what I want to do, it's at least
> interesting <wink>.

I'll put a patch on SF soon which does what you want to do, i.e. tries
tp_compare as the first thing if tp_richcompare is not there. Even
with this patch, your code is faster if strings have a
richcompare. Without richcompare, I get

0.720
0.720
0.720
0.730
0.720
0.720
0.730
0.720
0.720
0.730

With it, I get

0.710
0.720
0.720
0.710
0.710
0.720
0.710
0.710
0.710
0.720

Given that stock CVS python is in the 0.78 range, the different is
neglectable, though.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4