4 ms·
Anyone knows how Garnet outperforms others so much in pipelining >1 tests while being written in C#?
by magnio 1y ago
Anyone knows how Garnet outperforms others so much in pipelining >1 tests while being written in C#?
- idoubtit 1y agoI think the programming language is not relevant, especially since startup time plays no role. A different design can have much more impact, and IIRC Garnet is not fully compatible with Redis. The main difference appears to be that Garnet is more parallel, according to this student's report of benchmarking various keystores (see the "CPU usage" sections in the PDF) https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1969436&dswid=-8271 https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A196...
- algorithmsRcool 1y agoIf you look at Garnet's source code it is very non-idiomatic C#. It goes to extraordinary lengths to avoid the garbage collector. Almost all memory management is done with unmanaged memory and pointers. They also have a very clever internal design and do some other tricks like strategically avoiding async/await and moving I/O operations onto the network request thread.