So data caches are kinda trendy these days and I always thought most were crap because they use TCP and do all that copying. Wouldn't it be faster and cooler if it just used shared memory? Then I realised I could do it in a decentralized, serverless way if I use compare-and-swap atomic cpu operations and memory barriers. Just got rid of the last race condition my stress test revealed so this is nearing completion. It's called shampoo.
Shampoo has two data structures, a hash and a circular heap. This is how it hangs together:
A lot of very fiddly (nasty) pointer programming. One of the most complicated things I have ever programmed. I'm glad pointer arithmetic is considered unsafe these days. It is.
Comments appreciated
Shampoo has two data structures, a hash and a circular heap. This is how it hangs together:
A lot of very fiddly (nasty) pointer programming. One of the most complicated things I have ever programmed. I'm glad pointer arithmetic is considered unsafe these days. It is.
GitHub - turborat/shampoo: The fastest data cache imaginable
The fastest data cache imaginable. Contribute to turborat/shampoo development by creating an account on GitHub.
github.com
Comments appreciated
Last edited: