April 1, 2026
6:54 a.m.
Skip the expensive VariantChangeType/VariantCopyInd machinery when both operands are simple integer types (VT_I2, VT_I4, VT_EMPTY). For VarAdd, handle overflow promotion (I2+I2 that overflows to I4, I4+I4 that overflows to R8) matching native Windows behavior. For VarCmp, compare via LONGLONG to handle mixed I2/I4 correctly. This eliminates the dominant cost in VBScript For-loop step/compare operations, where VarAdd and VarCmp are called every iteration with trivial I2 operands but previously went through the full VARIANT conversion pipeline including locale allocation in ucrtbase. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10528