#13 see if we can get rid of the message Arc in client

Uzavrená
otvorené 1 rok pred užívateľom j3tracey · 1 komentárov

In the name of code reuse with peer mode, we put the messages in the channel between the state machine and the writer thread in an Arc. There's nothing wrong with this for correctness, but since a message only ever gets sent over one connection from the client, it's strictly overhead, and as a synchronization primitive, it forces cache coherence across NUMA nodes, which can be a major hit for performance (not that we won't be using tons of synchronization primitives anyway). We should see if there's an easy way to preserve code reuse while getting rid of this, likely through generics.

In the name of code reuse with peer mode, we put the messages in [the channel between the state machine and the writer thread](https://git-crysp.uwaterloo.ca/j3tracey/MGen/src/a77581b348197a48442afb1e2919749aa56060f3/src/bin/client.rs#L27) in an [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html). There's nothing wrong with this for correctness, but since a message only ever gets sent over one connection from the client, it's strictly overhead, and as a synchronization primitive, it forces cache coherence across NUMA nodes, which can be a major hit for performance (not that we won't be using tons of synchronization primitives anyway). We should see if there's an easy way to preserve code reuse while getting rid of this, likely through generics.
Justin Tracey okomentoval 1 rok pred
Vlastník

Fixed via 1d900f96b3

Fixed via 1d900f96b3
j3tracey zatvorené 1 rok pred
Prihláste sa pre zapojenie do konverzácie.
Žiadne štítky
Žiadny míľnik
Žiadny priradený
1 účastníkov
Načítavanie...
Zrušiť
Uložiť
Zatiaľ neexistuje žiadny obsah.