bug-bash
[Top][All Lists]
Advanced

[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: Mon, 13 Apr 2015 09:06:27 -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:

> 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'm not sure if it might be better to have other kind of data
> structure for this. TBH, I'm not sure if there's even enough justification for
> this, other than to make bash startup faster.

mt_hash isn't a bash function.  You might be running into an internal
malloc function from some libc implementation, or you might be running
into the devel branch's malloc debugging code.  That code has a significant
effect on performance, and always has.

-- 
``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/



reply via email to

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