perf(highlight): use a hashtable for highlight group names

syn_name2id and syn_check_group go brr.

Note: this has impact mostly when using multiple filetypes,
as the old syn_name2id was optimized to return latest
added groups quickly (which will be the latest filetype)
This commit is contained in:
Björn Linse
2021-08-18 17:05:28 +02:00
parent fca52f5f32
commit bb4b4d79a8
4 changed files with 31 additions and 19 deletions

View File

@@ -166,6 +166,7 @@ void early_init(mparm_T *paramp)
init_path(argv0 ? argv0 : "nvim");
init_normal_cmds(); // Init the table of Normal mode commands.
highlight_init();
syntax_init();
#ifdef WIN32
OSVERSIONINFO ovi;