Skip to content

Remove two unnecessary .Cast<>() usages#1577

Merged
lukebakken merged 1 commit intomainfrom
lukebakken/review-allocations
May 24, 2024
Merged

Remove two unnecessary .Cast<>() usages#1577
lukebakken merged 1 commit intomainfrom
lukebakken/review-allocations

Conversation

@lukebakken
Copy link
Collaborator

Noticed by @paulomorgado in #1233

@lukebakken lukebakken added this to the 7.0.0 milestone May 23, 2024
@lukebakken lukebakken self-assigned this May 23, 2024
@lukebakken lukebakken force-pushed the lukebakken/review-allocations branch from f541d82 to 73d7541 Compare May 23, 2024 19:25
@paulomorgado
Copy link
Contributor

Anytime you see System.Linq in your code or System.Linq.Enumerable in your profiling you should question that and benchmark.

If it's using a delegate or you have more than one operator, it's most likely a bad idea to use.

@lukebakken lukebakken force-pushed the lukebakken/review-allocations branch from 73d7541 to 393032b Compare May 24, 2024 13:02
@lukebakken lukebakken merged commit bf89475 into main May 24, 2024
@lukebakken lukebakken deleted the lukebakken/review-allocations branch May 24, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants