POV-Ray : Newsgroups : povray.off-topic : Reflections on employment : Re: Reflections on employment Server Time
29 Jul 2024 04:25:44 EDT (-0400)
  Re: Reflections on employment  
From: scott
Date: 5 Dec 2012 04:28:29
Message: <50bf13bd$1@news.povray.org>
On Tue 04/12/12 19:09, Orchid Win7 v1 wrote:
>>> Not exactly taxing, eh?
>>
>> Of course there are many ways to approach this in C# and most other
>> languages. Using LINQ and and working in decimal datatype without error
>> handling:
>>
>> private List<decimal> ParseAndSortValuesFromString1(string text)
>> {
>> return text.Split(' ').Select(s => Decimal.Parse(s)).OrderBy(s =>
>> s).ToList();
>> }
>
> According to one of the guys I work with, "LINQ is great and everything,
> but it makes the code extremely slow". Does anybody have any actual
> /facts/ with which to confirm or refute this? I would have expected
> there to be a fairly minimal speed difference...

LINQ has a certain amount of overhead, as to whether that significantly 
impacts the speed of your code obviously depends on the exact code and 
data you're dealing with. Even in your example I suspect the speed 
differential is highly dependent on the size of the list.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.