Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: The performance of LINQ vs. traditional iteration Pin
Rob Philpott30-Apr-13 4:57
Rob Philpott30-Apr-13 4:57 
GeneralRe: The performance of LINQ vs. traditional iteration Pin
Simon_Whale30-Apr-13 5:32
Simon_Whale30-Apr-13 5:32 
AnswerRe: The performance of LINQ vs. traditional iteration Pin
Freak3030-Apr-13 4:36
Freak3030-Apr-13 4:36 
AnswerRe: The performance of LINQ vs. traditional iteration Pin
Dave Kreskowiak30-Apr-13 5:17
mveDave Kreskowiak30-Apr-13 5:17 
AnswerRe: The performance of LINQ vs. traditional iteration Pin
Pete O'Hanlon30-Apr-13 6:38
mvePete O'Hanlon30-Apr-13 6:38 
GeneralRe: The performance of LINQ vs. traditional iteration Pin
Rob Philpott30-Apr-13 6:49
Rob Philpott30-Apr-13 6:49 
GeneralRe: The performance of LINQ vs. traditional iteration Pin
Simon_Whale30-Apr-13 23:41
Simon_Whale30-Apr-13 23:41 
AnswerRe: The performance of LINQ vs. traditional iteration Pin
Richard Deeming30-Apr-13 7:24
mveRichard Deeming30-Apr-13 7:24 
Strange - I'm not seeing the same results, and my computer isn't exactly new. Running in LinqPad, I get:

  • Release mode:
    • Simple Iteration : 2107
    • LINQ Query : 2168
    • Count Query : 2255
  • Debug mode:
    • Simple Iteration : 2273
    • LINQ Query : 2281
    • Count Query : 2758


Yes, there's a small difference, but at worst it's less than a 20% hit. It's certainly not taking three times as long.

If you add PLINQ into the picture, your loop starts to look pretty slow:
C#
count = numbers.AsParallel().Count(g => g % 7 == 0);

  • Simple Iteration : 2218
  • PLINQ Query : 1749




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: The performance of LINQ vs. traditional iteration Pin
Rob Philpott30-Apr-13 7:54
Rob Philpott30-Apr-13 7:54 
AnswerRe: The performance of LINQ vs. traditional iteration Pin
jschell30-Apr-13 9:54
jschell30-Apr-13 9:54 
QuestionCrystal Report without preview print is not working in published file Pin
swathipd30-Apr-13 0:34
swathipd30-Apr-13 0:34 
AnswerRe: Crystal Report without preview print is not working in published file Pin
Eddy Vluggen30-Apr-13 1:00
professionalEddy Vluggen30-Apr-13 1:00 
GeneralRe: Crystal Report without preview print is not working in published file Pin
swathipd1-May-13 19:00
swathipd1-May-13 19:00 
GeneralRe: Crystal Report without preview print is not working in published file Pin
Eddy Vluggen2-May-13 11:00
professionalEddy Vluggen2-May-13 11:00 
QuestionC# IE toolbar button runs bat or PS script. works one time then doesn't anymore. Pin
Member 990412330-Apr-13 0:19
Member 990412330-Apr-13 0:19 
Questionmodal popup inside another modal popup Pin
Gangula Sneha30-Apr-13 0:05
Gangula Sneha30-Apr-13 0:05 
AnswerRe: modal popup inside another modal popup Pin
GuyThiebaut30-Apr-13 0:38
professionalGuyThiebaut30-Apr-13 0:38 
QuestionRe: modal popup inside another modal popup Pin
Eddy Vluggen30-Apr-13 0:59
professionalEddy Vluggen30-Apr-13 0:59 
AnswerRe: modal popup inside another modal popup Pin
GuyThiebaut30-Apr-13 1:45
professionalGuyThiebaut30-Apr-13 1:45 
GeneralRe: modal popup inside another modal popup Pin
Eddy Vluggen30-Apr-13 2:11
professionalEddy Vluggen30-Apr-13 2:11 
GeneralRe: modal popup inside another modal popup Pin
GuyThiebaut30-Apr-13 2:22
professionalGuyThiebaut30-Apr-13 2:22 
GeneralRe: modal popup inside another modal popup Pin
Eddy Vluggen30-Apr-13 2:52
professionalEddy Vluggen30-Apr-13 2:52 
GeneralRe: modal popup inside another modal popup Pin
GuyThiebaut30-Apr-13 2:53
professionalGuyThiebaut30-Apr-13 2:53 
QuestionVFW blank frames at start of avi Pin
Boris The Bold29-Apr-13 23:24
Boris The Bold29-Apr-13 23:24 
QuestionBuying stock is easy, selling it is worse... loop problems? Pin
lordoftrades29-Apr-13 22:33
lordoftrades29-Apr-13 22:33 

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.