Inline System.Boolean Parse helper methods#64771
Conversation
- Profiling the boolean parse method showed that its helper methods weren't being inlined - Increases performance on the System.Tests.Perf_Boolean.Parse* microbenchmarks
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
summary: No Slower results for the provided threshold = 5% and noise filter = 0.3ns.
|
|
Thanks. It's unfortunately hard to make inlining decisions by running microbenchmarks - the microbenchmarks almost invariably get faster, but in a real app, the code can get significantly bigger. If it's helpful to inline these, perhaps we should consider why they're not getting inlined. |
|
The implementations can be streamlined with fewer reads: |
Sounds good, I'll close this PR for now as @stephentoub 's implementation is the better way to go to extract more performance. Thanks again @danmoseley
@stephentoub , very nice! |
|
Do appreciate the attempt though @L2. There are lots of issues marked up for grabs if you want to look at another. |
|
And we appreciate the inspiration here! |
Yeah I wouldn't have noticed if this PR didn't draw my eyes to it :-) |
helper methods weren't being inlined
microbenchmarks