Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
JacksonAllan
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
JacksonAllan
1y ago
I think the idea of using a union to store the element type without any extra run-time memory cost might have some use, specifically in cases where the container struct wouldn't typically store a variable of the element type (or, more
2.
▲
Show HN: Convenient Containers – ergonomic generics in C
(github.com)
2 points
by
JacksonAllan
1y ago
|
0 comments
3.
▲
by
JacksonAllan
1y ago
I use something similar in a container library to warn the user if he or she supplies an argument with potential side effects to a macro that evaluates it multiple times: https://github.com/JacksonAllan/CC/blob
4.
▲
by
JacksonAllan
2y ago
I think the 0.95 figure for Robin Hood hash tables is rather optimistic. Robin Hood helps in a few ways: it allows for early termination of failed lookups, and it reduces probe-length variance (thereby making the performance of any one hash
5.
▲
by
JacksonAllan
3y ago
I'll try to download and play around with your benchmarks when I have a chance. After reading you explanation of how you create the tables at the desired load factor, some of those plots definitely look rather odd to me. What I'd
6.
▲
by
JacksonAllan
3y ago
As I’m sure you know, benchmarking hash tables is pretty difficult because there’s many variables that affect their performance and it’s hard to cover all use cases. Let me start by explaining the benchmarks I linked you to earlier. Eventua
7.
▲
by
JacksonAllan
3y ago
In my example the table stores the hash codes themselves instead of the keys (because the hash function is invertible) Oh, I see, right. If determining the home bucket is trivial, then the back-shifting method is great. The issue is just
8.
▲
by
JacksonAllan
3y ago
findPreferredBucket rehashes. The problem with this deletion algorithm is that every element that is a candidate for back-shifting must be rehashed to ensure that we don't shift it back beyond its home bucket (unlike in Robin Hood prob
9.
▲
Better C Generics: The Extendible _Generic
(github.com)
3 points
by
JacksonAllan
4y ago
|
0 comments