summaryrefslogtreecommitdiff
path: root/zero.c
diff options
context:
space:
mode:
authorDima Kogan <dima@secretsauce.net>2014-07-09 01:09:33 -0700
committerChanho Park <chanho61.park@samsung.com>2014-08-22 20:38:26 +0900
commit070dc5826c9015cf8d8bfa04c429f419fd9d08ff (patch)
tree39c356ad730607b5684edf394d35b23a650349f0 /zero.c
parentac6502b964595e8eb8d5268ed9d79824cacaba91 (diff)
downloadltrace-070dc5826c9015cf8d8bfa04c429f419fd9d08ff.tar.gz
ltrace-070dc5826c9015cf8d8bfa04c429f419fd9d08ff.tar.bz2
ltrace-070dc5826c9015cf8d8bfa04c429f419fd9d08ff.zip
Made activate_latent_in() iterations much more efficient
Previously activate_latent_in() iterations looked like for(export names in lib1) // hash table iteration { for(symbol names in lib2) // list iteration { if(names equal && libsym->latent) { proc_activate_latent_symbol(proc, libsym) } } } This is inefficient both due to the double iteration but also since iterating over a hash table in slow (have to look through all cells, even empty ones). This patch turns this logic into for(symbol names in lib2) // list iteration { if(name in lib1 export names && libsym->latent) // hash table lookup { proc_activate_latent_symbol(proc, libsym) } } So there's no more double iteration, and the hash iteration was turned into a hash lookup. Much better.
Diffstat (limited to 'zero.c')
0 files changed, 0 insertions, 0 deletions