Click here to Skip to main content
14,270,872 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
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
memberhoney 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
memberhoney 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
protectorPIEBALDconsult19-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
memberhoney 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
protectorPIEBALDconsult19-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
memberhoney 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
memberhoney 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
memberMember 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
memberhoney 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
memberhoney the codewitch19-Jul-19 21:49 
GeneralThought of the Day Pin
OriginalGriff19-Jul-19 4:39
protectorOriginalGriff19-Jul-19 4:39 
GeneralRe: Thought of the Day Pin
PeejayAdams19-Jul-19 4:58
memberPeejayAdams19-Jul-19 4:58 
GeneralRe: Thought of the Day Pin
DRHuff19-Jul-19 5:31
memberDRHuff19-Jul-19 5:31 
GeneralRe: Thought of the Day Pin
dandy7219-Jul-19 6:29
memberdandy7219-Jul-19 6:29 
GeneralRe: Thought of the Day Pin
lopatir19-Jul-19 7:14
memberlopatir19-Jul-19 7:14 
Generalif you love cats, and are considering euthanasia Pin
BillWoodruff19-Jul-19 4:26
mveBillWoodruff19-Jul-19 4:26 
GeneralRe: if you love cats, and are considering euthanasia Pin
OriginalGriff19-Jul-19 4:42
protectorOriginalGriff19-Jul-19 4:42 
GeneralRe: if you love cats, and are considering euthanasia Pin
BillWoodruff19-Jul-19 4:53
mveBillWoodruff19-Jul-19 4:53 
GeneralRe: if you love cats, and are considering euthanasia Pin
OriginalGriff19-Jul-19 5:03
protectorOriginalGriff19-Jul-19 5:03 
GeneralRe: if you love cats, and are considering euthanasia Pin
Chris C-B19-Jul-19 19:06
memberChris C-B19-Jul-19 19:06 
GeneralRe: if you love cats, and are considering euthanasia Pin
BillWoodruff19-Jul-19 22:28
mveBillWoodruff19-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.