[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'cat' and 'rm' as builtins ?
From: |
Tim Rühsen |
Subject: |
Re: 'cat' and 'rm' as builtins ? |
Date: |
Sun, 30 Oct 2016 20:26:20 +0100 |
User-agent: |
KMail/5.2.3 (Linux/4.7.0-1-amd64; KDE/5.27.0; x86_64; ; ) |
On Sonntag, 30. Oktober 2016 17:33:15 CET Tim Rühsen wrote:
> Hi,
>
> currently, some GNU people are developing ideas and code to speed up the GNU
> toolchain (autotools, make).
>
> A simple ./configure for wget calls 'cat' ~2000 times, same with 'rm'.
> This sums up to a roughly 5-10% of the overall time used in ./configure.
>
> Since cat and rm implementations are pretty small in code size, I wonder if
> you (the maintainers) would accept patches to make these commands builtin
> commands.
>
> To keep backward compatibility for sure, these builtins could be disabled by
> default. A following small change in autotools could enable these.
>
> My current plan is to use the builtin code for 'cat' only when no options
> are given. If options are given, fall back to fork/exec.
>
> With 'rm' I would use builtin code for no options, for -r and for -f (and
> -r/- f combined), else fall back to fork/exec.
>
> WDYT ?
Sorry, me again =)
Just found examples/loadables...
If ./configure detects bash, it could load custom shared objects of course.
Less invasive, just project-related, but more control outside of bash (e.g.
one could enable the loadables from config.site file).
Tim
signature.asc
Description: This is a digitally signed message part.