Package: sed
Version: 4.1.5-1
Severity: normal

[EMAIL PROTECTED] time sed -n '/^[^=]/p' func.def-notype | wc -l
177725

real    0m0.181s
user    0m0.172s
sys     0m0.040s
[EMAIL PROTECTED] time sed -n '/^=/b; /^./p' func.def-notype | wc -l
177725

real    0m0.219s
user    0m0.212s
sys     0m0.040s
[EMAIL PROTECTED] time sed -n '/^=/b; /^$/b ;p' func.def-notype | wc -l
177725

real    0m0.915s
user    0m0.888s
sys     0m0.052s

[EMAIL PROTECTED] time sed -n '/^=/b; /^$/!p' func.def-notype | wc -l
177725

real    0m0.949s
user    0m0.932s
sys     0m0.048s

The '/^$/' thing generally slows down processing very much. But it
should IMHO speed it up, because it skips empty lines before any
processing in particular part of the script.

Maybe zero, great zero length check is done every time, thus
additional commands just slow down everything. This is the only reason
i can think of. Then, this can be documented.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-5-amd64
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)

Versions of packages sed depends on:
ii  libc6                  2.3.6.ds1-13etch2 GNU C Library: Shared libraries

sed recommends no packages.

-- no debconf information
-- 
sed 'sed && sh + olecom = love' << ''
-o--=O`C
 #oo'L O
<___=E M



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to