Skip to content

Release 3.2.0

Latest
Compare
Choose a tag to compare
@nicholassm nicholassm released this 10 Aug 20:18
· 3 commits to main since this release
  • New scheme for publishing available sequences to consumers in the Multi Producer case:
    • The availability of a sequence number (slot in the RingBuffer) is now encoded using a single bit instead of an AtomicI32.
    • The bit encodes whether the associated slot in the RingBuffer was published in an odd or even round (determined by the sequence numbers and how many rounds the RingBuffer has taken given its size).
    • The scheme reduces memory by 32 times for the data structure for storing the availability (not counting the padding which was also removed but which is CPU-architecture specific).
    • The performance is the same for single event publication but better for batch publication as
      1. each thread can exploit caching better due to the compressed data structure,
      2. there are fewer writes to atomics and thus
      3. the scheme reduces pressure on store buffers.
    • The TLA+ model has been updated with this scheme and verified.