Open turol opened 2 months ago
Looks like MSVC doesn't like the empty initializers. I don't have MSVC to test with, what kind of syntax does it want?
Looks like MSVC doesn't like the empty initializers. I don't have MSVC to test with, what kind of syntax does it want?
It should work with { 0 }
instead of { }
.
That table looks like it might be auto-generated by isagenerator
, will have to see what @vlutas thinks about this.
There are several problems with this change:
switch
statements - it only introduces new arrays, as a potential for cache missesThis change essentially just rewrites existing code in a different way, with no clear benefit. Like I mentioned in previous PRs, significant changes will only be accepted if they bring a significant improvement.
It doesn't remove the switches but it does make them somewhat more predictable. This should help the branch predictor.
The code is pretty well optimized already so to me 1-2% speedups are significant.
Unfortunately, the improvement is nowhere nearly enough to justify such a significant change.
NdParseOperand
is taking up a lot of cycles. This seems to be because of the unpredictable switches. This is an attempt to make it faster by handling "regular" cases with arrays. It makes the branches more predictable but only has a slight effect on performance.It might be possible to speed it up more by re-numbering
ND_OPERAND_SIZE_SPEC
andND_OPERAND_TYPE_SPEC
so the regular cases are either first or last.