[Top][All Lists]

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

Re: [bug-gawk] gawk startup time

From: Neil R. Ormos
Subject: Re: [bug-gawk] gawk startup time
Date: Fri, 14 Dec 2018 13:03:31 -0600 (CST)

Andrew J. Schorr wrote:
> Peng Yu wrote:
>> http://www.drdobbs.com/shell-corner-bash-dynamically-loadable-b/199102950

>> Bash also has a loadable extension that can be
>> used to load a dynamic library. I think that it
>> should be able to make gawk as a bash loadable
>> to reduce the startup time of gawk. See
>> below---gawk startup time is much slower than a
>> bash function or a bash built-in command.

>> Will it cause any problem to make gawk a bash
>> loadable module (e.g., could it conflict with
>> the extension loading facility in gawk)?

> I think you are underestimating the challenges,
> but feel free to give it a try.

> Why are you so concerned with overhead?  You are
> comparing apples and oranges.  Running an
> external program is very different than running
> an internal bash command. [...]

When I find that a shell script I am writing is
riddled with calls to gawk, it's often a signal to
reconsider how the workload is factored between
the shell and gawk.  In many cases, life is more
pleasant when the script logic and string
processing are performed in gawk, with occasional
calls to external programs, instead of the other
way around.

Best regards,

--Neil Ormos

reply via email to

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