[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] make function local
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] make function local |
Date: |
Thu, 16 Apr 2015 11:07:34 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 4/12/15 5:56 PM, Eduardo A. Bustamante López wrote:
> Oh, you already have lots of things to do to bother with this :-)
>
> Anyways, I'll expand them.
>
> On Fri, Apr 10, 2015 at 04:35:25PM -0400, Chet Ramey wrote:
>> On 4/10/15 10:13 AM, Eduardo A. Bustamante López wrote:
>>
>>> - a faster implementation of the variable lookup code
>>
>> What does this mean, exactly? Optimizing the existing code paths? (Have at
>> it.) Different semantics? Static as opposed to dynamic scoping?
>
> Yes. I've been using gprof to study the code paths of some basic functions,
> and
> it seems like it spends quite some time in the find_variable() and related
> functions (IIRC, there was an mt_hash or something function taking up some
> precious time).
I knew that rang a bell somewhere. mt_hash is a function in the bash
malloc library that keeps track of all allocations and deallocations in
a table. It's part of the debugging that is enabled when you build from
the devel code. It's been well-known for a long time that the debugging
code in malloc slows bash down considerably; that's why it's not enabled
as part of bash releases.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: [Help-bash] make function local, (continued)
- Re: [Help-bash] make function local, Pierre Gaston, 2015/04/10
- Re: [Help-bash] make function local, Peng Yu, 2015/04/10
- Re: [Help-bash] make function local, Eduardo A . Bustamante López, 2015/04/10
- Re: [Help-bash] make function local, Greg Wooledge, 2015/04/10
- Re: [Help-bash] make function local, Chet Ramey, 2015/04/11
- Re: [Help-bash] make function local, Greg Wooledge, 2015/04/13
- Re: [Help-bash] make function local, Chet Ramey, 2015/04/13
- Re: [Help-bash] make function local, Chet Ramey, 2015/04/10
- Re: [Help-bash] make function local, Eduardo A . Bustamante López, 2015/04/12
- Re: [Help-bash] make function local, Chet Ramey, 2015/04/13
- Re: [Help-bash] make function local,
Chet Ramey <=
- Bash performance when declaring variables (was: Re: [Help-bash] make function local), Eduardo A . Bustamante López, 2015/04/16
- Re: Bash performance when declaring variables, Chet Ramey, 2015/04/17
- Re: Bash performance when declaring variables, Eduardo A . Bustamante López, 2015/04/17
- Re: [Help-bash] make function local, Chet Ramey, 2015/04/16
- Re: [Help-bash] make function local, Dan Douglas, 2015/04/16
- Re: [Help-bash] make function local, Chet Ramey, 2015/04/16
- Re: [Help-bash] make function local, Dan Douglas, 2015/04/10
Re: [Help-bash] make function local, Linda Walsh, 2015/04/17