Mercurial > vim
comparison src/proto/hashtab.pro @ 17508:34966be2e856 v8.1.1752
patch 8.1.1752: resizing hashtable is inefficient
commit https://github.com/vim/vim/commit/7b73d7ebf71c9148c90a500116f25ec2314c7273
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 26 21:26:34 2019 +0200
patch 8.1.1752: resizing hashtable is inefficient
Problem: Resizing hashtable is inefficient.
Solution: Avoid resizing when the final size is predictable.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 26 Jul 2019 21:30:06 +0200 |
parents | 21b0a39d13ed |
children | 684e6dfa2fba |
comparison
equal
deleted
inserted
replaced
17507:b64a5a737a7c | 17508:34966be2e856 |
---|---|
7 void hash_debug_results(void); | 7 void hash_debug_results(void); |
8 int hash_add(hashtab_T *ht, char_u *key); | 8 int hash_add(hashtab_T *ht, char_u *key); |
9 int hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash); | 9 int hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash); |
10 void hash_remove(hashtab_T *ht, hashitem_T *hi); | 10 void hash_remove(hashtab_T *ht, hashitem_T *hi); |
11 void hash_lock(hashtab_T *ht); | 11 void hash_lock(hashtab_T *ht); |
12 void hash_lock_size(hashtab_T *ht, int size); | |
12 void hash_unlock(hashtab_T *ht); | 13 void hash_unlock(hashtab_T *ht); |
13 hash_T hash_hash(char_u *key); | 14 hash_T hash_hash(char_u *key); |
14 /* vim: set ft=c : */ | 15 /* vim: set ft=c : */ |