Move `types` out of the function; make it a module-level variable. There's little point in creating the dictionary on every call. 

Rename it `VIMSCRIPT_VARIABLE_TYPES`.