Click here to Skip to main content
15,895,746 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: There is no efficient way to do this, but I'm doing it anyway. Pin
Richard Deeming19-Jul-19 5:32
mveRichard Deeming19-Jul-19 5:32 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:36
mvahoney the codewitch19-Jul-19 5:36 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Richard Deeming19-Jul-19 5:44
mveRichard Deeming19-Jul-19 5:44 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:48
mvahoney the codewitch19-Jul-19 5:48 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
PIEBALDconsult19-Jul-19 5:33
mvePIEBALDconsult19-Jul-19 5:33 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:38
mvahoney the codewitch19-Jul-19 5:38 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
PIEBALDconsult19-Jul-19 6:09
mvePIEBALDconsult19-Jul-19 6:09 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 6:11
mvahoney the codewitch19-Jul-19 6:11 
in my experience the 20x difference comes when you're doing lots and lots of nested foreach operations, like doing a ton of functional style queries, due to the heap pressure of all those object creation and destructions.

in truth, that function was whipped together in a few minutes so I just didn't bother with for loops.

I only think about performance in terms of linear vs log times - basically mathematical complexity of functions.

Beyond that, I profile. So for code like this it gets changed if and when it needs to be.

However, given the nested nature of this call it is probably best to change it to for loops early on.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Richard Deeming19-Jul-19 5:35
mveRichard Deeming19-Jul-19 5:35 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:37
mvahoney the codewitch19-Jul-19 5:37 
JokeRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Member 1433107619-Jul-19 5:46
Member 1433107619-Jul-19 5:46 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 5:47
mvahoney the codewitch19-Jul-19 5:47 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
Sander Rossel19-Jul-19 19:00
professionalSander Rossel19-Jul-19 19:00 
GeneralRe: There is no efficient way to do this, but I'm doing it anyway. Pin
honey the codewitch19-Jul-19 21:49
mvahoney the codewitch19-Jul-19 21:49 
GeneralThought of the Day Pin
OriginalGriff19-Jul-19 4:39
mveOriginalGriff19-Jul-19 4:39 
GeneralRe: Thought of the Day Pin
PeejayAdams19-Jul-19 4:58
PeejayAdams19-Jul-19 4:58 
GeneralRe: Thought of the Day Pin
DRHuff19-Jul-19 5:31
DRHuff19-Jul-19 5:31 
GeneralRe: Thought of the Day Pin
dandy7219-Jul-19 6:29
dandy7219-Jul-19 6:29 
GeneralRe: Thought of the Day Pin
lopatir19-Jul-19 7:14
lopatir19-Jul-19 7:14 
Generalif you love cats, and are considering euthanasia Pin
BillWoodruff19-Jul-19 4:26
professionalBillWoodruff19-Jul-19 4:26 
GeneralRe: if you love cats, and are considering euthanasia Pin
OriginalGriff19-Jul-19 4:42
mveOriginalGriff19-Jul-19 4:42 
GeneralRe: if you love cats, and are considering euthanasia Pin
BillWoodruff19-Jul-19 4:53
professionalBillWoodruff19-Jul-19 4:53 
GeneralRe: if you love cats, and are considering euthanasia Pin
OriginalGriff19-Jul-19 5:03
mveOriginalGriff19-Jul-19 5:03 
GeneralRe: if you love cats, and are considering euthanasia Pin
Chris C-B19-Jul-19 19:06
Chris C-B19-Jul-19 19:06 
GeneralRe: if you love cats, and are considering euthanasia Pin
BillWoodruff19-Jul-19 22:28
professionalBillWoodruff19-Jul-19 22:28 

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.