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 rhettinger
Recipients barry, brandtbucher, ethan.furman, mark.dickinson, ncoghlan, petr.viktorin, rhettinger, serhiy.storchaka, veky, vstinner
Date 2021-09-12.11:20:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Interestingly, "little" is faster than "big".

$ python3.10 -m timeit -r11 -s 'x=3452452454524' 'x.to_bytes(10, "little")'
5000000 loops, best of 11: 82.7 nsec per loop
$ python3.10 -m timeit -r11 -s 'x=3452452454524' 'x.to_bytes(10, "big")'
5000000 loops, best of 11: 90.6 nsec per loop
Date User Action Args
2021-09-12 11:20:58rhettingersetrecipients: + rhettinger, barry, mark.dickinson, ncoghlan, vstinner, petr.viktorin, ethan.furman, serhiy.storchaka, veky, brandtbucher
2021-09-12 11:20:58rhettingersetmessageid: <>
2021-09-12 11:20:58rhettingerlinkissue45155 messages
2021-09-12 11:20:58rhettingercreate