performance: remove unneeded ToArray calls#2174
performance: remove unneeded ToArray calls#2174TimothyMakkison wants to merge 1 commit intoDapperLib:mainfrom
ToArray calls#2174Conversation
0100f84 to
3ddf8e4
Compare
mgravell
left a comment
There was a problem hiding this comment.
Looks good; I'll need to double check impact on the full TFM range (i.e. the older overloads), but: 👍
|
|
||
| // Before we get all emitty... | ||
| var lookup = string.Join("|", names.ToArray()); | ||
| var lookup = string.Join("|", names); |
There was a problem hiding this comment.
A "char" vs "string" can be used in Join() call.
There was a problem hiding this comment.
I'm scared of getting nerd sniped here, but I'm pretty sure they do the same thing. string.Join(char and string.Join(string. both call JoinCore. The only difference is it converts the char into a Span via new ReadOnlySpan<char>(in separator) before calling JoinCore. Code here
I would love to know if the generated code is different between char and string
There was a problem hiding this comment.
You are right, they are similar. I was thinking of semantic use of "char" with the explicit visibility purpose of a-single-char-operation :)
There was a problem hiding this comment.
@mgravell With lots of pull requests in the queue, are we going to have a new Dapper release any time soon? And, if you or your team needs assistance, how can it be possible?
Removes unnecessary
ToArraycalls