Message172676
| Author |
glyph |
| Recipients |
Arfrever, exarkun, glyph, pitrou, skrah |
| Date |
2012年10月11日.19:05:13 |
| SpamBayes Score |
0.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1349982313.47.0.647413038173.issue15945@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It's worth noting that the "buffer()" built-in in Python2 had this behavior, and it enabled a copy-reduction optimization within Twisted's outgoing transport buffer.
There are of course other ways to do this, but it seems like it would be nice to restore this handy optimization; it seems like a bug, or at least an oversight, that the convenience 'bytes+memoryview' (which cannot provide a useful optimization) works, but 'memoryview+bytes' (which would be equally helpful from a convenience perspective _could_ provide a reduction in copying) doesn't.
Despite the bytes.join optimization (which, don't get me wrong, is also very helpful, almost necessary) this remains very useful. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年10月11日 19:06:27 | glyph | set | spambayes_score: -1.0 -> 0.0 |
| 2012年10月11日 19:05:13 | glyph | set | recipients:
+ glyph, exarkun, pitrou, Arfrever, skrah |
| 2012年10月11日 19:05:13 | glyph | set | messageid: <1349982313.47.0.647413038173.issue15945@psf.upfronthosting.co.za> |
| 2012年10月11日 19:05:13 | glyph | link | issue15945 messages |
| 2012年10月11日 19:05:13 | glyph | create |
|