GNU bug report logs - #23848
sed not using unlocked_stdio

Previous Next

Package: sed;

Reported by: Tristan Verniquet <tverniquet <at> gmail.com>

Date: Sat, 25 Jun 2016 17:10:02 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tristan Verniquet <tverniquet <at> gmail.com>
To: bug-sed <at> gnu.org
Subject: sed not using unlocked_stdio
Date: Sat, 25 Jun 2016 22:10:13 +1000
[Message part 1 (text/plain, inline)]
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)
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 178 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.