This optimization will allow to optimize for the case where offsets start at 0 and therefore it wont be necesarry to add the offset to the stack.
The proper way to handle this is duplicating the method code and have 2 MSIL paths. One that will handle the (Offset == 0) condition and another one that will handle the (Offset != 0) condition. The concept itself is more or less the same used at optimizing compilers to handle Loop Unrolling.
This optimization will allow to optimize for the case where offsets start at 0 and therefore it wont be necesarry to add the offset to the stack.
The proper way to handle this is duplicating the method code and have 2 MSIL paths. One that will handle the (Offset == 0) condition and another one that will handle the (Offset != 0) condition. The concept itself is more or less the same used at optimizing compilers to handle Loop Unrolling.