Click here to Skip to main content
15,906,626 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: In .NET enumeration is slow Pin
trønderen20-Jan-24 6:38
trønderen20-Jan-24 6:38 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch20-Jan-24 7:19
mvahoney the codewitch20-Jan-24 7:19 
GeneralRe: In .NET enumeration is slow Pin
trønderen20-Jan-24 8:28
trønderen20-Jan-24 8:28 
GeneralRe: In .NET enumeration is slow Pin
PIEBALDconsult18-Jan-24 9:53
mvePIEBALDconsult18-Jan-24 9:53 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 9:55
mvahoney the codewitch18-Jan-24 9:55 
GeneralRe: In .NET enumeration is slow Pin
Eddy Vluggen18-Jan-24 15:17
professionalEddy Vluggen18-Jan-24 15:17 
GeneralRe: In .NET enumeration is slow Pin
Dave Kreskowiak18-Jan-24 11:09
mveDave Kreskowiak18-Jan-24 11:09 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 11:21
mvahoney the codewitch18-Jan-24 11:21 
IList<t> uses methods as well. Virtual calls and everything. There is no direct array access through IList<t> afaik

So the primary difference between IEnumerable<t> and IList<t> is the creation of a new object to traverse the former.

Microsoft appears to believe that object creation is very cheap in .NET, and everything I've read from them suggests they practically think it's free. It's not.

That was 30% gain in performance.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: In .NET enumeration is slow Pin
PIEBALDconsult18-Jan-24 11:34
mvePIEBALDconsult18-Jan-24 11:34 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 11:48
mvahoney the codewitch18-Jan-24 11:48 
GeneralRe: In .NET enumeration is slow Pin
Eddy Vluggen18-Jan-24 15:19
professionalEddy Vluggen18-Jan-24 15:19 
GeneralRe: In .NET enumeration is slow Pin
Kenneth Haugland18-Jan-24 11:30
mvaKenneth Haugland18-Jan-24 11:30 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 11:43
mvahoney the codewitch18-Jan-24 11:43 
GeneralRe: In .NET enumeration is slow Pin
Gerry Schmitz18-Jan-24 11:50
mveGerry Schmitz18-Jan-24 11:50 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 12:04
mvahoney the codewitch18-Jan-24 12:04 
GeneralRe: In .NET enumeration is slow Pin
Graeme_Grant18-Jan-24 12:02
mvaGraeme_Grant18-Jan-24 12:02 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 12:05
mvahoney the codewitch18-Jan-24 12:05 
GeneralRe: In .NET enumeration is slow Pin
Graeme_Grant18-Jan-24 12:08
mvaGraeme_Grant18-Jan-24 12:08 
GeneralRe: In .NET enumeration is slow Pin
Richard Andrew x6418-Jan-24 12:21
professionalRichard Andrew x6418-Jan-24 12:21 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 12:42
mvahoney the codewitch18-Jan-24 12:42 
GeneralRe: In .NET enumeration is slow Pin
Graeme_Grant18-Jan-24 13:03
mvaGraeme_Grant18-Jan-24 13:03 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 13:07
mvahoney the codewitch18-Jan-24 13:07 
GeneralRe: In .NET enumeration is slow Pin
Graeme_Grant18-Jan-24 13:16
mvaGraeme_Grant18-Jan-24 13:16 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 13:22
mvahoney the codewitch18-Jan-24 13:22 
GeneralRe: In .NET enumeration is slow Pin
Graeme_Grant18-Jan-24 13:44
mvaGraeme_Grant18-Jan-24 13:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.