For-loop counters and conditional comparisons hit VarAdd/VarCmp every iteration with trivial I2/I4 operands, but the full VARIANT conversion pipeline (VariantChangeType, locale grab/free in ucrtbase) dominates the cost. Short-circuit at the call site in interp.c when both operands are pure VT_I2/VT_I4: compare directly, or add via LONGLONG with native promotion (I2+I2 -> I4 on overflow, I4+I4 -> R8 on overflow). Alternative to !10528 Keeps the optimisation scoped to vbscript c ### Compared to !10528 (oleaut32 version) | Scenario | master | !10528 (oleaut32) | this MR (vbscript) | |---|---:|---:|---:| | Empty For (10M) | 2678 | 364 (7.4x) | **320 (8.2x)** | | If-condition in loop | 3678 | 718 (5.1x) | **632 (5.8x)** | | Local var reads | 1247 | 403 (3.1x) | **382 (3.25x)** | | Class prop read | 289 | 164 (1.8x) | 171 (1.73x) | | For R8 counter | 2910 | 2764 | 2625 | | String concat | 70 | 70 | 70 |allers rather than adding branches to oleaut32 generic VarAdd/VarCmp. -- v2: vbscript: Fast-path interp_add and var_cmp for pure-integer operands. https://gitlab.winehq.org/wine/wine/-/merge_requests/10921