[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23848: sed not using unlocked_stdio
From: |
Tristan Verniquet |
Subject: |
bug#23848: sed not using unlocked_stdio |
Date: |
Sat, 25 Jun 2016 22:10:13 +1000 |
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
(on ubuntu 16.04 with skylake processor)
- bug#23848: sed not using unlocked_stdio,
Tristan Verniquet <=