Uh oh!
There was an error while loading. Please reload this page.
Small improvement for String.length - #9469
Conversation
abelbraaksma
commented
Jun 17, 2020
cartermp
commented
Jun 17, 2020
The CLA is a consequence of moving to dotnet/fsharp I believe? |
abelbraaksma
commented
Jun 17, 2020
Possible, anyway, signing took 3 seconds, so it's not a big deal :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
KevinRansom
commented
Jun 17, 2020
@abelbraaksma It seems as though you combined two changes into one PR and proposed it twice. /cc @vzarytovskii |
abelbraaksma
commented
Jun 17, 2020
@KevinRansom, yeah, that's why I shouldn't do this long after midnight ;) I meant to split them (@cartermp and @forkiasked for a PR per function), and thought I only locally had done the accidental merge. I used VS's github integration, and couldn't switch branches on the PR page, so I couldn't create a new PR on the 2nd branch, and after some frustration clearly did something else wrong ;) Will fix. |
Uh oh!
There was an error while loading. Please reload this page.
KevinRansom
commented
Jun 17, 2020
@abelbraaksma thanks for taking care of this. Kevin |
* Simplify and improve perf of String.length * Improve performance of String.map * Revert "Improve performance of String.map" * Turn String.length into a one-liner, fixesdotnet/fsharp#9469 (comment)
* Simplify and improve perf of String.length * Improve performance of String.map * Revert "Improve performance of String.map" * Turn String.length into a one-liner, fixesdotnet#9469 (comment)

The PR removes some overhead for
String.length, see #9390 (comment).The disassembly will change from this:
to this:
Which, in timings, gives roughly a 33% improvement, but since this is hard to test in isolation, it may be more because more chances exist now for optimizing & inlining this by the JIT (which, in this isolated case, indeed happens).
More info and timings in the connected issue comment above.