Memory allocation

- In programming, you will experience…a tip in performance when using…libraries that wrap and simplify functionality.…The additional overhead comes from…converting from easy to use features…to the proper underlying calls.…This is true of LINQ queries.…If I needed the additional performance…and therefore wanted to work with that LINQ.…I can rewrite my queries using…for loop statements.…This program contains a large list of products.…And I want to find all the items…that contain the word panel.…I've created a LINQ query that returns the items…and converts it into an array.…

It will run a thousand times.…And calculates the time it took to run.…I've also created the query using a…for each loop and run it a thousand times as well.…I will run this program…and I see that total time…for each version printed to the console.…As well as the average time per run.…We see that LINQ takes longer to run.…But only by a little bit.…In general, the performance is slower with LINQ.…But in most cases the slowness…is not so great to deter developers from using it.…

Resume Transcript Auto-Scroll

Author

Released

11/30/2015

Want an easy way to query and update data? To query different data stores with a single tool? LINQ is the answer. Language-Integrated Query (LINQ) extends Visual Studio with powerful query capabilities based on C# and Visual Basic. LINQ makes big data doable.

In LINQ with C# Essential Training, engineer Olivia Chiu introduces techniques for querying, updating, and transforming data with LINQ. She covers standard queries—such as finding overlaps in two datasets and creating hierarchies—as well as complex chained queries. She also shows how to group and join LINQ queries with lambda expressions, and use LINQ to query SQL databases and XML documents. Last but not least, Olivia provides tips for optimizing the performance of your queries.