[New-bugs-announce] [issue3106] speedup some comparisons

Antoine Pitrou report at bugs.python.org
Fri Jun 13 20:38:04 CEST 2008


New submission from Antoine Pitrou <pitrou at free.fr>:

This patch is an experiment in making faster some of the most common
comparisons (str vs. str, int vs. int). I don't know if it may bring
noticeable speedups in real-world situations, but here are the synthetic
benchmark numbers (from pybench, "this" is the patched version and
"other" is vanilla py3k):

Test                             minimum run-time        average  run-time
                                 this    other   diff    this    other 
 diff
-------------------------------------------------------------------------------
                 CompareFloats:   182ms   173ms   +5.4%   182ms   176ms
  +3.4%
         CompareFloatsIntegers:   238ms   232ms   +2.3%   242ms   236ms
  +2.5%
               CompareIntegers:   237ms   277ms  -14.4%   237ms   280ms
 -15.2%
        CompareInternedStrings:   163ms   257ms  -36.7%   163ms   258ms
 -36.7%
                  CompareLongs:   137ms   160ms  -14.5%   137ms   162ms
 -15.6%
                CompareStrings:   149ms   170ms  -12.1%   154ms   170ms
  -9.5%
-------------------------------------------------------------------------------
Totals:                          1105ms  1268ms  -12.9%  1115ms  1281ms
 -13.0%

----------
components: Interpreter Core
files: cpms.patch
keywords: patch
messages: 68174
nosy: pitrou
severity: normal
status: open
title: speedup some comparisons
type: performance
versions: Python 3.0
Added file: http://bugs.python.org/file10622/cpms.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3106>
_______________________________________


More information about the New-bugs-announce mailing list