optimizations for MSVC