This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients larry, martin.panter, mdk, rhettinger, serhiy.storchaka, vstinner
Date 2016-11-26.10:45:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480157107.03.0.0721984946723.issue28754@psf.upfronthosting.co.za>
In-reply-to
Content
Julien, you can declare the hi parameter as

    hi: Py_ssize_t(py_default="len(a)") = -1

if you want the signature be matching the documentation.

In general, it is better to use converter names rather than format codes.

> Curiously, this patch gives about a 10% to 15% speedup.  Any sense of how that improvement arises?

This is rather a random difference. Try to run the bench several times.  With using Victor's perf module the difference is not significant.

Maybe using FASTCALL have some positive effect, but it is unlikely noticeable with such complex function.
History
Date User Action Args
2016-11-26 10:45:07serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, vstinner, larry, martin.panter, mdk
2016-11-26 10:45:07serhiy.storchakasetmessageid: <1480157107.03.0.0721984946723.issue28754@psf.upfronthosting.co.za>
2016-11-26 10:45:07serhiy.storchakalinkissue28754 messages
2016-11-26 10:45:06serhiy.storchakacreate