[issue17787] Optimize pickling function dispatch in hot loops.

2013-11-24 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch is too complicated for too little. -- resolution: - rejected stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17787

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-20 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Are you asking why do we need to call both PyMemoTable_Get and memo_get? Or, why do we fetching the memo was moved to the save functions? For the former, there is no real reason. The extra call could be removed though profiling doesn't show this call as

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the explanation. I guess I don't like the code duplication that this patch adds. Perhaps a macro hiding the memo_get code blocks? Also, adding your explanation as a comment would be nice too. -- ___

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-18 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: In addition, we could bring back the switch dispatch based on the first letter of the type name. It does seem to speed up things as well but as much as the type cache optimization. -- nosy: +pitrou, serhiy.storchaka title: Optimize pickling

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why did you add all those calls to PyMemoTable_Get? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17787 ___