3 ms·
Do you think it’s possible to obtain this performance with Rust? I’ve been down the path you’re on a few times and I love the pursuit. Have built my own over
by cplusplusfellow 3y ago
Do you think it’s possible to obtain this performance with Rust?
I’ve been down the path you’re on a few times and I love the pursuit. Have built my own over the years about 4 times.
Hardware was much slower in those days so my lower barrier was 650ns. Things got worse appreciably as a function of the number of producers I found.
Some of my most sleepless nights. The funnest nights.
- topbanana 3y agostd::collections::vec_deque is implemented as a growable ring buffer so you might like to start there https://doc.rust-lang.org/std/collections/vec_deque/index.html https://doc.rust-lang.org/std/collections/vec_deque/index.ht...
- samsquire 3y agoHow many producers and how many consumers is that 650 nanoseconds? I have pinned threads to even numbered cores with pthread_setaffinity_np and that seems to have evened out the MPMC ringbuffer - 2 producers 2 consumers to under 400 nanoseconds, usually under 1000 nanoseconds. I think hyperthreading causes problems. EDIT: Would you like to chat about this? I would like to! My email is in my profile.