Remove null checks before GetValueOrDefault - #2663
Conversation
Can you please share your perf tests and results? What's the impact when all values are null? When some are null? When none are null? Etc. |
|
cc: @VSadov |
This approach should be faster if the number of nulls in the source is low. If the number of nulls is high then this will likely be slower, especially in the decimal case. Let's see what benchmarks will say :) |
|
Thanks for sharing. Based purely on the data you shared, I don't think this is a change we should take. Where there was an improvement, it was typically significantly less than 1%, and there were plenty of regressions, including several greater than 1%, and one almost 5%. |
|
Alright, I understand. Thanks. |
Separated from PR #2318. Free perf.