Click here to Skip to main content
15,886,919 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
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 
Quote:
And yet otherwise in my tests, the spanless string approach i use (Substring instead of Splice) doesn't yield noticeably less performance. That leads me to suspect I'm not using it to its fullest - an encouraging thought in the big picture because it means I can get even more speed out of it. I'm not sure that's possible though because no matter how I think about approaching it a copy is always necessary by the time you hit the Value property off FAMatch. It's a head scratcher.

Without knowing specifics, it is difficult to comment.

That article is about dealing with gigabytes of data using streams efficiently keeping allocations to a minimum. There was a lot of research, trial & error done to find the best optimal solution. I even looked at the source code of Microsoft's latest (At the time) .Net Core. Renting ReadOnlyMemory<t>[^] was not suitable as all memory blocks needed to be of the same size otherwise nulls fill the gaps. This is not documented anywhere! And I did look. That was a real headscratcher at the time.

Don't get me started on ref strut in an asynchronous environment...

I'm sure if you take a step back, do a bit of research, experimenting, digging into the Microsoft code, you will find a solution.

Graeme


"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 13:49
mvahoney the codewitch18-Jan-24 13:49 
GeneralRe: In .NET enumeration is slow Pin
Graeme_Grant18-Jan-24 13:58
mvaGraeme_Grant18-Jan-24 13:58 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 14:04
mvahoney the codewitch18-Jan-24 14:04 
GeneralRe: In .NET enumeration is slow Pin
Graeme_Grant18-Jan-24 14:28
mvaGraeme_Grant18-Jan-24 14:28 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 14:29
mvahoney the codewitch18-Jan-24 14:29 
GeneralRe: In .NET enumeration is slow Pin
honey the codewitch18-Jan-24 14:09
mvahoney the codewitch18-Jan-24 14:09 
GeneralRe: In .NET enumeration is slow Pin
obermd19-Jan-24 3:47
obermd19-Jan-24 3:47 
GeneralRe: In .NET enumeration is slow Pin
Andy Brummer19-Jan-24 6:17
sitebuilderAndy Brummer19-Jan-24 6:17 
GeneralAnd so this is just a problem there? Pin
jschell18-Jan-24 5:28
jschell18-Jan-24 5:28 
GeneralRe: And so this is just a problem there? Pin
Gerry Schmitz18-Jan-24 7:18
mveGerry Schmitz18-Jan-24 7:18 
GeneralRe: And so this is just a problem there? Pin
Bruno van Dooren18-Jan-24 20:24
mvaBruno van Dooren18-Jan-24 20:24 
GeneralMS can't catch a break when it comes to search PinPopular
dandy7218-Jan-24 5:04
dandy7218-Jan-24 5:04 
GeneralRe: MS can't catch a break when it comes to search Pin
PIEBALDconsult18-Jan-24 5:08
mvePIEBALDconsult18-Jan-24 5:08 
GeneralRe: MS can't catch a break when it comes to search Pin
dandy7218-Jan-24 5:43
dandy7218-Jan-24 5:43 
GeneralRe: MS can't catch a break when it comes to search Pin
David O'Neil18-Jan-24 6:55
professionalDavid O'Neil18-Jan-24 6:55 
QuestionRe: MS can't catch a break when it comes to search Pin
fgs196318-Jan-24 7:36
fgs196318-Jan-24 7:36 
GeneralRe: MS can't catch a break when it comes to search Pin
snorkie18-Jan-24 5:46
professionalsnorkie18-Jan-24 5:46 

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.