[issue35559] Optimize base64.b16decode to use compiled regex

Karthikeyan Singaravelan report at bugs.python.org
Sat Dec 22 04:20:04 EST 2018


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

Thanks Serhiy, the other issue noted about performance improvement removing casefold and I thought re.search per call to be inefficient. My bad that I didn't consider the cost of moving the compilation to module level that affects import time and about using -X importtime. I agree that the cost is not worthy given that regex is used only inside b16decode. I will keep these factors in mind when I am doing similar sort of work and try to do a better analysis.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35559>
_______________________________________


More information about the Python-bugs-list mailing list