[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23848: sed not using unlocked_stdio
From: |
Jim Meyering |
Subject: |
bug#23848: sed not using unlocked_stdio |
Date: |
Sat, 25 Jun 2016 22:29:31 -0600 |
On Sat, Jun 25, 2016 at 6:10 AM, Tristan Verniquet <address@hidden> wrote:
> sed 4.2.2
>
> Most reading and writing is done in utils.c, but this does not include
> sed.h or the "unlocked-io.h" header.
>
> ltrace sed '' < <(seq 1 100)
>
> Shows lots of calls to the locked system calls.
>
> Adding include "sed.h" in utils.c and recompling and re-running ltrace
> shows the _unlocked() variants being used.
>
> This improves the performance when reading the output of seq 1 1e8 from 9.5
> seconds to 6.4 seconds. ie:
>
> time sed '' < seq.1e8 >/dev/null
Thanks for the report and the suggested fix. That sounds right, indeed.