Тёмный

C# LINQ Performance Tips #5 - Skip & .NET Runtimes 

LevelUp
Подписаться 6 тыс.
Просмотров 2 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
4 года назад
The enumerable returned by Skip() can implement IList and then FirstOrDefault() can use the indexer to get the first item. That's how it's implemented in Hyperlinq.
@LevelUppp
@LevelUppp 4 года назад
That's perfectly valid implementation. The last example was just me having fun and de-virtualizing everything :) The performance was something else though. That gives me an idea to construct a version of de-virt linq having one global Enumerable struct will all of the needed information and construct our LINQ contract on that.
4 года назад
@@LevelUppp Hyperlinq is fully devirtualized but I'd love to see our take on that.
@LevelUppp
@LevelUppp 4 года назад
@ de-virtualized as not going through the VTABLE or VSD. Using only concrete implementations and not interfaces.
4 года назад
@@LevelUppp Hyperlinq uses constrained interfaces (adds IL opcode constrained) so, although you see them on the code, the calls are not virtual.
@LevelUppp
@LevelUppp 4 года назад
@ Ahh right so you say notnull when you want to enforce struct?
@AbdllahBinHatheemAliGeeSuth
@AbdllahBinHatheemAliGeeSuth 4 года назад
Its happening the same thing with entity freamwork?
@LevelUppp
@LevelUppp 4 года назад
No EF is a different technology so Im not sure what are the differences.
Далее
C# LINQ Performance Tips #6 - Value Delegates
15:07
Просмотров 2,4 тыс.
5 (Extreme) Performance Tips in C#
12:26
Просмотров 75 тыс.
无意间发现了老公的小金库 #一键入戏
00:20
Brutally honest advice for new .NET Web Developers
7:19
Don’t Use the Wrong LINQ Methods
12:42
Просмотров 46 тыс.
Stop Using FirstOrDefault in .NET! | Code Cop #021
12:54
Testing in .NET is About to Change
12:54
Просмотров 76 тыс.
C# What JIT Generates? - Loop Cloning
14:25
Просмотров 1,2 тыс.
JetBrains Rider is Now Free! Rider vs Visual Studio
6:53