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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/