Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/proto/hashtab.pro +++ b/src/proto/hashtab.pro @@ -9,6 +9,7 @@ int hash_add(hashtab_T *ht, char_u *key) int hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash); void hash_remove(hashtab_T *ht, hashitem_T *hi); void hash_lock(hashtab_T *ht); +void hash_lock_size(hashtab_T *ht, int size); void hash_unlock(hashtab_T *ht); hash_T hash_hash(char_u *key); /* vim: set ft=c : */