Also is it the real bottleneck?
Yes. It saves ~1min on every Gitlab CI test run, which is ~3.5% of the total time. The main part being the winetest.exe initialization, which runs every test to query its test list.
Maybe we can use an alternate data structure. For example, store enums of the same type in an array to reduce look-up time and see how much we can reduce.
I don't know, I think there's no reason to use lstrcmpiW here except for convenience. There's a few places where the strings may be dynamic but most of the time we're even comparing static ASCII strings. I didn't write tests but I doubt even the dynamic strings are locale-dependent.