Тёмный

Fast F#: Writing a Dictionary Part 12: Byte LL Inline 

Fast F#
Подписаться 2,2 тыс.
Просмотров 272
50% 1

Our Byte Linked List backed Dictionary is already faster than the Dictionary built into .NET but can we make it go faster? Let's take some inspiration from a Mike Acton talk given at CppCon 2014.
Mike Acton Talk: • CppCon 2014: Mike Acto...
=== Contact ===
Email: hi@fastfsharp.com
Mastadon: mastodon.sdf.org/@fastfsharp
Twitter: / fastfsharp
=== Tags ===
Tags: #fsharp, #dotnet, #highperformance, #programing

Наука

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

 

19 фев 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@robertlenders8755
@robertlenders8755 Год назад
Considering programming for the most common case and knowing that `hash int = int` you could create a custom bucket struct just for the case of int keys where you don't need to store the hash code or check for hash code equality.
@FastFSharp
@FastFSharp Год назад
In my benchmarks, I'm using `int` for the key but the most common scenarios for me or a mixture of Struct and Ref types, not `int`. Good thought though 😊
@talwald1680
@talwald1680 Год назад
Very cool, but what about the code duplication? How do you maintain that? Also, raising an exception directly adds a lot of instuctions to the current function, so I wonder if you move the throwing to a helper method would that have an impact on performance as well
@FastFSharp
@FastFSharp Год назад
I don't really care about code duplication in this scenario. This series is all about performance. If you don't want code duplication, you're welcome to fork the repo 😊. I'll have to look at moving the throwing of the exception to a helper. I'm following some of the conventions I say in the .NET Dictionary.
@talwald1680
@talwald1680 Год назад
@@FastFSharpRecently dotnet moved almost all throw statements into helpers to reduce code size and improve inlining all over the BCL. You can read about it in the performance article published by the dotnet team on microsoft dev blog
@FastFSharp
@FastFSharp Год назад
@@talwald1680 I tried it out and it didn't make any difference in performance. I think that is due to the Loop function being it's own method that rarely gets called.
Далее
Fast F#: Intro to Classes
22:23
Просмотров 873
Risc-V Bare Metal C Hello World!
21:37
Просмотров 2,5 тыс.
Fast F#: Intro to Active Patterns
25:21
Просмотров 1,4 тыс.
Fast F#: Intro to Interfaces
22:01
Просмотров 785
Why I Don't Use Else When Programming
10:18
Просмотров 1,2 млн
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 812 тыс.
How to Soldering wire in Factory ?
0:10
Просмотров 6 млн
#engineering #diy #amazing #electronic #fyp
0:59
Просмотров 2,4 млн
Новодельный ноутбук Pocket386
1:16:17