[issue41262] Convert memoryview to Argument Clinic

2020-07-19 Thread Stefan Krah
Stefan Krah added the comment: Thanks, I can confirm that the speedup for memoryview.cast() is large in microbenchmarks. Still, if the speedup cannot be seen in programs like test_buffer, the amount of code that's being added for a speedup < 5% in real world programs is quite substantial (if

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not have other benchmarks. memoryview was just one of few builtins which still use PyArg_ParseTupleAndKeywords() and I know how inefficient it is. Since Argument Clinic was already used for memoryview.hex() I did not see problems with converting the

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Stefan Krah
Stefan Krah added the comment: I cannot detect a speedup in test_buffer, which is a heavy user of memoryviews: # before: >>> a = [3.742, 3.589, 3.542, 3.495, 3.481, 3.620, 3.773, 3.755, 3.701, 3.661] >>> sum(a) / 10 3.63589995 # after >>> b = [3.63, 3.596, 3.475, 3.43, 3.792, 3.58,

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 80a50368c0e4dc9d56af0ce748dea35c9d96d23f by Serhiy Storchaka in branch 'master': bpo-41262: Convert memoryview to Argument Clinic. (GH-21421) https://github.com/python/cpython/commit/80a50368c0e4dc9d56af0ce748dea35c9d96d23f --

[issue41262] Convert memoryview to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20570 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21421 ___ Python tracker

[issue41262] Convert memoryview to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Argument Clinic, Interpreter Core -Extension Modules nosy: +larry ___ Python tracker ___

[issue41262] Convert memoryview to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR converts Objects/memoryobject.c to Argument Clinic. Advantages: * Highly optimized code is used to parse arguments instead of slow PyArg_ParseTupleAndKeywords(). * All future improvements of argument parsing (better performance or errors