bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Examples of concurrent coproc usage?


From: Martin D Kealey
Subject: Re: Examples of concurrent coproc usage?
Date: Sun, 21 Apr 2024 23:42:35 +1200

On Sat, 20 Apr 2024 at 01:14, Chet Ramey <chet.ramey@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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]