Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[interp] Fold "ldstr".Length to a constant
A similar optimization for RyuJIT was quite profitable judging by the jit-diff: dotnet/runtime#1378 Example: ```csharp static int Test() { return "hello".Length; } ``` Current `MONO_VERBOSE_METHOD=Test` output: ``` IR_0000: ldstr 0 IR_0002: strlen IR_0003: ret ``` New output: ``` IR_0000: ldc.i4.5 IR_0001: ret ```
- Loading branch information