help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `printf %q` but more human readable


From: Pier Paolo Grassi
Subject: Re: `printf %q` but more human readable
Date: Mon, 15 Mar 2021 13:15:08 +0100

it depends on what the external executable does and how much slower is to
do the same task in bash, depending on this it may be quicker to execute an
external binary for certain tasks.
the parsing of a complex string and the application of special quoting
rules may be one of these tasks, the advantage of the external binary may
be subject of course to the length of the parsed string.

Pier Paolo Grassi


Il giorno dom 14 mar 2021 alle ore 16:24 Alex fxmbsw7 Ratchev <
fxmbsw7@gmail.com> ha scritto:

> there is big delay loading the app and apps, regardless if its big or not
> ill benchmark:
>
> time- +time ; loop 1000 '/bin/test -f non' ; +time ; loop 1000 '[[ -f non
> ]]' ; +time time%
> 1615735409.511662 0.926062 0.028636
>
> makes /bin/test needed nearly 1s for that loop and [[ -f 0.03s
>
>
>
> On Sun, Mar 14, 2021 at 4:03 PM Marco Ippolito <maroloccio@gmail.com>
> wrote:
>
> > On 14/03/2021 12:01, Alex fxmbsw7 Ratchev wrote:
> > > exec*() external programs is always much slower than coding language
> > > internals
> >
> > When you say "always", do you mean independently of the actual program?
> >
> >
> >
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]