Re: Stdio.Buffer, need a way to revisit old positions in the output
"Stephen R. van den Berg" <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Per Hedbor () @ Pike (-) importm?te f?r mailinglistan wrote: >> b. Using the writeable subbuffer is tricky at best, and cannot be considered >> lightweight anymore; get/set_addpos are practically for free. >And, yes, it would be a larger change to the internals. >It would however automate the 'do not write more than' code, and the >'update length field' code. True. However, given the premises that Stdio.Buffer was/is for speed, then any solution that involves creating another object for this seems a bit wasteful. I.e. those are a lot of memory accesses (for creating the new object) whereas we only want a simple "pointer access" to past data. -- Stephen.