dgski / atomic_playground

Strengthening my atomic operation knowledge with some hands-on coding.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Atomic Playground

Strengthening my atomic operation knowledge with some hands-on coding.

Components

  • WaitFreeChannel: Inter-thread communication 'channel' with lock and Wait free reading, lock-free writing. Results on M1 Macbook Air:
    • locking averagePollingTimeNs=652
    • waitFree averagePollingTimeNs=51
  • WaitFreeQueue: Inter-thread queue with lock and wait free reading, lock-free writing. Results on M1 Macbook Air:
    • lockingTotalThroughputPerSecond=7128056
    • waitFreeTotalThroughputPerSecond=15051376
  • WaitFreeAsyncWorker: Single background thread worker that leverages wait-free queues to allow rapid scheduling of tasks and subsequent callbacks. Results on M1 Macbook Air:
    • averageSchedulingTimeNs=97
    • averagePollingTimeNs=67
  • WaitFreeChannelSingleUse: Inter-thread communication 'channel' with lock and Wait free reading, lock-free writing. Can use more simpler, more relaxed atomic operations as there is no intention of re-use. Results on M1 Macbook Air:
    • locking averagePollingTimeNs=readTimeTaken=46ns, writeTimeTaken=41ns
    • waitFree averagePollingTimeNs=readTimeTaken=24ns, writeTimeTaken=39ns

About

Strengthening my atomic operation knowledge with some hands-on coding.


Languages

Language:C++ 96.1%Language:CMake 3.5%Language:Shell 0.4%