[Git][wine/wine][master] 2 commits: vbscript: Use indexed lookup for global functions.
Alexandre Julliard pushed to branch master at wine / wine Commits: 966709b2 by Francis De Brabandere at 2026-04-17T18:32:48+02:00 vbscript: Use indexed lookup for global functions. Replace O(N) linear scans through global_funcs[] with O(log N) tree lookups using Wine's existing rb_tree. This affects Global_GetRef, ScriptDisp_GetDispID, exec_global_code, and lookup_global_funcs in the interpreter. With 1000 dynamically created functions (e.g. scripts using ExecuteGlobal in loops), GetRef varied dispatch drops from 503ms to 58ms (8.7x), reaching parity with Windows (62ms). - - - - - 8681d44e by Francis De Brabandere at 2026-04-17T18:32:52+02:00 vbscript: Use indexed lookup for global variables. Replace O(n) linear scans through global_vars[] with O(log n) tree lookups using Wine's existing rb_tree. This affects lookup_global_vars, interp_dim, exec_global_code duplicate checking, ScriptDisp_GetDispID, ScriptTypeInfo_GetIDsOfNames, ScriptTypeComp_Bind, and lookup_script_identifier. Scripts that register thousands of global variables via ExecuteGlobal spend the majority of CPU time in the linear scan. - - - - - 6 changed files: - dlls/vbscript/compile.c - dlls/vbscript/global.c - dlls/vbscript/interp.c - dlls/vbscript/vbdisp.c - dlls/vbscript/vbscript.c - dlls/vbscript/vbscript.h View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/ac6b8fb0a5832b592170208cc0eba4... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/ac6b8fb0a5832b592170208cc0eba4... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)