On Tue, Feb 21, 2023 at 11:21:47PM +0000, Drew Adams wrote: > > I'm reading some bytes into a temp buffer, like so: > > > > (with-temp-buffer > > (set-buffer-multibyte nil) > > (insert-file-contents-literally filename nil 0 64000)) > > > > then I pass these bytes to functions for processing, like this > > > > (func1 (buffer-string)) > > > > or sometimes just part of them > > > > (func2 (substring (buffer-string) 100 200)) > > Why aren't you passing the buffer itself to func1? > Why aren't you passing the buffer itself and the limits 100 and 200 to func2? > > What is it that you're really trying to do? That's exactly the point, yes. > Yes, if you start manipulating strings instead of buffer text you will pay a performance penalty, in general. ...the question being whether it's worth it or not. Sometimes it is, sometimes it isn't :-) Cheers -- t