Тёмный

Fast F#: Writing a Dictionary Part 11 - Byte Linked List 

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

Наука

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

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@mattbecker3066
@mattbecker3066 Год назад
Great to have you back. You said there is a very small probability that the “next” offset is >255 and therefore cannot be stored in a single byte. But however small there is a positive probability it will happen. Indeed, with a carefully constructed, albeit terrible, hash function you should be able to contrive this situation. So it seems to me that it’s an edge case that needs to be handled. What is the strategy in this case? It doesn’t need to be efficient, but I think it does need to be handled.
@mattbecker3066
@mattbecker3066 Год назад
I guess you could assign a special meaning to next=255, such that when looking up a value, if you don’t find a hashcode-matching entry at bucket[currentIndex+255] then you need to continue with a linear search.
@FastFSharp
@FastFSharp Год назад
@@mattbecker3066 My plan is to add code to track whether a rollover has happened and then call a resize once the Key/Value pair has been inserted. You have to be careful to not have that be called to many times which is why I haven't added the handler yet. It will be in an epilogue episode.
@talwald1680
@talwald1680 Год назад
Great video! This was really cool. Could we mix this with Robin hood eviction to minimize the jump sizes? Does that help? And in general, I saw the talk that you reference, and I was wondering if you think there should be multiple standard dictionaries in like a collections.specialized package in the BCL?
@FastFSharp
@FastFSharp Год назад
You should watch the next video that released today 😊
@KamillaMirabelle
@KamillaMirabelle Год назад
And all i see is the kinda implementation of alloc in C
@FastFSharp
@FastFSharp Год назад
We'll end up creating a version that is very "C-like" at the end.
Далее
Fast F#: Intro to Options
23:30
Просмотров 708
PERFECT PITCH FILTER.. (CR7 EDITION) 🙈😅
00:21
Просмотров 3,4 млн
КОТЯТА НАУЧИЛИСЬ ГОВОРИТЬ#cat
00:13
🦊🔥
00:16
Просмотров 765 тыс.
8 Data Structures Every Programmer Should Know
17:09
Просмотров 52 тыс.
10 Crazy Python Operators That I Rarely Use
11:37
Просмотров 25 тыс.
Fast F#: Intro to Maps
18:06
Просмотров 886
WHY IS THE HEAP SO SLOW?
17:53
Просмотров 229 тыс.
Why You Shouldn't Nest Your Code
8:30
Просмотров 2,7 млн
What is the Smallest Possible .EXE?
17:04
Просмотров 402 тыс.
Самый длинный ноутбук!
0:23
Просмотров 47 тыс.