Message216018
> >>> array.array('i', [0]) * 3
@Serhiy Storchaka:
The keyword is "efficiently". Let's analyze: this creates useless array.array('i', [0]) object destined only for garbage collection. Then, it forces using loop of loops to fill in a new object. Whereas array.array('i', 3) immediately reduces to a memset().
You can say that these implementation efficiency issues are of little concert to CPython. But what's being reported here is that, while generally Python is pretty good in allowing to efficiently process raw binary data (memoryview and all other bits and pieces), there are inconsistent accidental gaps in API here and there which jeopardize efficiency, in obvious way (and also obvious to resolve), what may be of concern for other Python implementations (my case). |
|
Date |
User |
Action |
Args |
2014-04-13 15:19:09 | pfalcon | set | recipients:
+ pfalcon, terry.reedy, ncoghlan, serhiy.storchaka |
2014-04-13 15:19:09 | pfalcon | set | messageid: <1397402349.42.0.233488933208.issue21180@psf.upfronthosting.co.za> |
2014-04-13 15:19:09 | pfalcon | link | issue21180 messages |
2014-04-13 15:19:08 | pfalcon | create | |
|