rust is my passion
rust is my passion
It's like sync.Map but can work on multiple keys atomically.
🚀
github.com/tidwall/bisc...
It's like sync.Map but can work on multiple keys atomically.
🚀
github.com/tidwall/bisc...
and the house always wins.
(...in most languages)
and the house always wins.
Make it a lookup (hashmap)
Split it up into smaller pieces (sharding)
Combine it into one large piece (map reduce)
Make it a lookup (hashmap)
Split it up into smaller pieces (sharding)
Combine it into one large piece (map reduce)
I'm only half joking, all you need to get a DI container going is a HashMap, that's gotta be the most pragmatic
blog.p-y.wtf/diy-your-own...
#AndroidDev
I'm only half joking, all you need to get a DI container going is a HashMap, that's gotta be the most pragmatic
blog.p-y.wtf/diy-your-own...
#AndroidDev
For missed lookups the hashmap begins outperforming the array at 2(!) keys.
For missed lookups the hashmap begins outperforming the array at 2(!) keys.
nnethercote.github.io/perf-book/ha...
nnethercote.github.io/perf-book/ha...
> ask Brendan Eich if the array is a vector or a hashmap
> he doesn't understand
> pull out diagram explaining O(1) vs O(n log n) access time
> he laughs and says "it's a good data structure sir"
> allocate an array
> arr[0] and arr["0"] both resolve to the same bucket
> ask Brendan Eich if the array is a vector or a hashmap
> he doesn't understand
> pull out diagram explaining O(1) vs O(n log n) access time
> he laughs and says "it's a good data structure sir"
> allocate an array
> arr[0] and arr["0"] both resolve to the same bucket
Imagine we are a university and we want to keep track of our professors and the courses they teach.
Let's implement a simple in-memory database using a HashMap and discuss various HashMap operations.
Imagine we are a university and we want to keep track of our professors and the courses they teach.
Let's implement a simple in-memory database using a HashMap and discuss various HashMap operations.
but after 1000 lines of code i have finally gotten though the boilerplate and made it do a thing
it's an mvcc hashmap with serializable transactions, and i got a read only snapshot running while i made changes, neat
but after 1000 lines of code i have finally gotten though the boilerplate and made it do a thing
it's an mvcc hashmap with serializable transactions, and i got a read only snapshot running while i made changes, neat