From d52f46da4571c7c44954b15f85a00d74ab86f7f3 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 5 Feb 2019 17:27:24 +0900 Subject: Implement symbol hash table to boost `find_symbol`. In 4174e02, we removed the symbol hash table from `mrb_state` but `find_symbol` was too slow with linear search. My performance estimation was wrong. So we implemented a new compact hash table for symbols. --- include/mruby.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/mruby.h') diff --git a/include/mruby.h b/include/mruby.h index 7fe2330be..2f2d98677 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -240,6 +240,7 @@ typedef struct mrb_state { mrb_sym symidx; struct symbol_name *symtbl; /* symbol table */ + mrb_sym symhash[256]; size_t symcapa; #ifdef MRB_ENABLE_DEBUG_HOOK -- cgit v1.2.3