On Sat, 20 Apr 2024 at 01:14, Chet Ramey <chet.ra...@case.edu> wrote:

> On 4/17/24 8:55 PM, Martin D Kealey wrote:
> > Has anyone tried asking any of the kernel teams (Linux, BSD, or other) to
> > add a new system call such as readln() or readd()?
>
> They'd probably point you to an optimized version of getdelim/getline.
> You're just pushing the work down a layer.
>

Yes, that is exactly my point: move the work to where it can be done most
efficiently and most reliably.

This efficiency gain isn't some minor quibble; we're talking about a
multi-fold increase in performance, perhaps an order of magnitude speed-up
reading some text files.

(I've done some testing that indicates about a 90% reduction in time spent
in kernel calls, but depending on what else is done this might translate to
only a 3-fold improvement in practice. Or not be noticeable at all, if
you're running a slow command for each line.)

-Martin
        • R... Chet Ramey
          • ... Zachary Santer
        • R... Zachary Santer
          • ... Carl Edquist
          • ... Andreas Schwab
          • ... Zachary Santer
          • ... Carl Edquist
          • ... Chet Ramey
          • ... Martin D Kealey
          • ... Chet Ramey
          • ... Martin D Kealey
          • ... Chet Ramey
          • ... Carl Edquist
          • ... Martin D Kealey
          • ... Carl Edquist via Bug reports for the GNU Bourne Again SHell
          • ... Martin D Kealey
          • ... Carl Edquist via Bug reports for the GNU Bourne Again SHell
          • ... Zachary Santer
          • ... Martin D Kealey
          • ... Carl Edquist
  • Re: Examples o... Carl Edquist

Reply via email to