Message313468
The struct.Struct docs claim that creating and re-using a Struct object will be noticeably faster than calling the module level methods repeatedly with the same format string, as it will avoid parsing the format string multiple times: https://docs.python.org/3/library/struct.html#struct.Struct
This claim is questionable, as struct has used an internal Struct cache since at least 2.5, so if you're using less than 100 different struct layouts in any given process, the only thing you'll be saving is a string-keyed dictionary lookup. |
|
Date |
User |
Action |
Args |
2018-03-08 23:22:58 | ncoghlan | set | recipients:
+ ncoghlan, docs@python |
2018-03-08 23:22:58 | ncoghlan | set | messageid: <1520551378.96.0.467229070634.issue33032@psf.upfronthosting.co.za> |
2018-03-08 23:22:58 | ncoghlan | link | issue33032 messages |
2018-03-08 23:22:58 | ncoghlan | create | |
|