[issue3106] speedup some comparisons

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I committed the patch, which will also help #1717. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3106

[issue3106] speedup some comparisons

2008-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2008-12-13 16:08, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Here is a new patch without any dispatch shortcut in ceval.c, just optimizations in unicodeobject.c and longobject.c. Net result on pybench:

[issue3106] speedup some comparisons

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le lundi 15 décembre 2008 à 14:41 +, Marc-Andre Lemburg a écrit : Why have you removed the complete error handling section in PyUnicode_RichCompare() ? Because the only error that can occur is a TypeError when one of the two arguments is

[issue3106] speedup some comparisons

2008-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2008-12-15 16:34, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Le lundi 15 décembre 2008 à 14:41 +, Marc-Andre Lemburg a écrit : Why have you removed the complete error handling section in

[issue3106] speedup some comparisons

2008-12-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a new patch without any dispatch shortcut in ceval.c, just optimizations in unicodeobject.c and longobject.c. Net result on pybench: Test minimum run-timeaverage run-time

[issue3106] speedup some comparisons

2008-12-13 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: If there's not a hurry, would like to review this a bit more when I get back early next week. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3106

[issue3106] speedup some comparisons

2008-12-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: If there's not a hurry, would like to review this a bit more when I get back early next week. No pb! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3106

[issue3106] speedup some comparisons

2008-11-16 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: You may get better timings if you more the types-are-equal test inside the types-i-know test. Instead of: + if (Py_TYPE(v) == Py_TYPE(w)) { + if (PyLong_CheckExact(v)) { + if

[issue3106] speedup some comparisons

2008-11-16 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Hello, You may get better timings if you more the types-are-equal test inside the types-i-know test. I get no discernable difference. In general, I'm not too keen on adding this kind of dispatch code to ceval.c. It saves the time spent

[issue3106] speedup some comparisons

2008-07-14 Thread Raymond Hettinger
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- assignee: - rhettinger ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3106 ___ ___ Python-bugs-list

[issue3106] speedup some comparisons

2008-07-13 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Raymond, would you want to take a look? -- nosy: +rhettinger ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3106 ___

[issue3106] speedup some comparisons

2008-06-13 Thread Antoine Pitrou
New submission from Antoine Pitrou [EMAIL PROTECTED]: 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