Author serhiy.storchaka
Recipients barry, djhoulihan, pitrou, scoder, serhiy.storchaka, xtreak
Date 2018-12-22.08:55:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545468941.25.0.98272194251.issue35559@roundup.psfhosted.org>
In-reply-to
Content
According to your results, you will save 0.94 us per call of b16decode, but loss 126 us at import time. You will get a benefit if b16decode is used more than 130 time.

Currently, if the performance is critical, the user can use binascii.unhexlify() directly or use bytes.fromhex(). base64.b16decode() is only needed if you need to ensure that the input strictly conforms to RFC 3548.

Other options, which will maximize the performance while keeping the validation is to add an option to binascii.unhexlify() for making it more strict. At the time of writing the base64 module its performance was not considered critical, and additional checks and preprocessing was implemented in Python.
History
Date User Action Args
2018-12-22 08:55:43serhiy.storchakasetrecipients: + serhiy.storchaka, barry, pitrou, scoder, xtreak, djhoulihan
2018-12-22 08:55:41serhiy.storchakasetmessageid: <1545468941.25.0.98272194251.issue35559@roundup.psfhosted.org>
2018-12-22 08:55:41serhiy.storchakalinkissue35559 messages
2018-12-22 08:55:41serhiy.storchakacreate