[issue26201] Faster type checking in listobject.c

2016-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg258942 ___ Python tracker ___

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread Jeremy Kloth
Jeremy Kloth added the comment: Added review -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide any microbencmarks that show the benefit of this optimization? -- ___ Python tracker ___

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread Raymond Hettinger
New submission from Raymond Hettinger: A number of fine-grained methods in Objects/listobject.c use PyList_Check(). They include PyList_Size, PyList_GetItem, PyList_SetItem, PyList_Insert, and PyList_Append. The PyList_Check() works by making two sequentially dependent memory fetches:

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Jeremy, thanks for the keen eyes. Attaching a revised patch. Serhiy, pure python code doesn't directly access any of the C-API functions touched by the patch, so timeit-style examples aren't possible. The beneficiaries of the change are external modules.

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread STINNER Victor
STINNER Victor added the comment: > Could you please provide any microbencmarks that show the benefit of this > optimization? Yeah, analyzing the assembler seems overkill to me. I'm not sure that it really make the code faster (but it makes the code more complex). -- nosy: +haypo

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Writing your own static optimizer from scratch is overkill. Following basic techniques from the Agner Fog manuals and Intel optimization manuals is quite reasonable in comparison. Unless you see an actual defect in the patch, I'm applying it. --

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread STINNER Victor
STINNER Victor added the comment: > As noted above, it not reasonable for a C-API that isn't used internally > because there is no reasonable way to measure the effect without writing a C > extension. Come on, there is a lot of C functions in Python using the C PyList_xxx() API. It's easy to

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou, yselivanov ___ Python tracker ___ ___

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Well, Serhiy Storchaka asked for a microbenchmark. > For an optimization, it's a reasonable request no? As noted above, it not reasonable for a C-API that isn't used internally because there is no reasonable way to measure the effect without writing a C

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread STINNER Victor
STINNER Victor added the comment: > Unless you see an actual defect in the patch, I'm applying it. Well, Serhiy Storchaka asked for a microbenchmark. For an optimization, it's a reasonable request no? > Writing your own static optimizer from scratch is overkill. My goal is to get speedup on

[issue26201] Faster type checking in listobject.c

2016-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've lost interest in talking with you. AFAICT you aren't doing anything to help advance or study the patch. You're just being a PITA and are now enlisting people to gang-up on a trivial patch. This is disgusting. -- status: open -> closed