summaryrefslogtreecommitdiffstats
path: root/protsym.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-14 07:44:35 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-14 07:44:35 -0800
commit2ab6f0183ba2fb014cc028aeb8afb6a2aba7c059 (patch)
tree37e1126e0ebfff351489ba63ee9cda8ef5e670b9 /protsym.c
parentee7866ae60fe4357bbcd453dbfdf5a90528dda7b (diff)
downloadtxr-2ab6f0183ba2fb014cc028aeb8afb6a2aba7c059.tar.gz
txr-2ab6f0183ba2fb014cc028aeb8afb6a2aba7c059.tar.bz2
txr-2ab6f0183ba2fb014cc028aeb8afb6a2aba7c059.zip
Optimize hash operation with unsafe car/cdr.
The associative lists that make up the chains of a hash table are guaranteed to be made of conses. We can use unsafe versions of car, cdr, rplaca and rplacd to speed up hash operations. * eval.c (op_dohash): Use unsafe operations on hash cell. * filter.c (trie_compress, regex_from_trie): Likewise. * hash.c (hash_equal_op, hash_print_op, hash_mark, hash_grow, hash_assoc, hash_assql, copy_hash_chain, gethash, inhash, gethash_n, sethash, remhash, hash_next, maphash, do_weak_tables, group_by, group_reduce, hash_keys_lazy, hash_keys, hash_values_lazy, hash_values, hash_pairs_lazy, hash_pairs, hash_alist_lazy, hash_uni, hash_diff, hash_symdiff, hash_isec, hash_subset, hash_update, hash_update_1, hash_revget): Likewise. * lib.c (us_rplaca, us_rplacd): New functions. (package_local_symbols, package_foreign_symbols, where, populate_obj_hash, obj_hash_merge): Use unsafe operations on hash cell * lib.h (us_rplaca, us_rplacd): Declared. * parser.c (circ_backpatch, get_visible_syms): Use unsafe operations on hash cell. * struct.c (method_name, get_slot_syms): Likewise.
Diffstat (limited to 'protsym.c')
0 files changed, 0 insertions, 0 deletions