-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small improvement for String.length #9469
Conversation
The CLA is a consequence of moving to dotnet/fsharp I believe? |
Possible, anyway, signing took 3 seconds, so it's not a big deal :) |
@abelbraaksma It seems as though you combined two changes into one PR and proposed it twice. /cc @vzarytovskii |
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@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, fixes dotnet/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, fixes dotnet#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.