Changeset 525b5ef
- Timestamp:
- Jan 13, 2020, 12:49:14 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 768bd556
- Parents:
- a21dec4
- Location:
- benchmark/basic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/basic/fetch_add.c
ra21dec4 r525b5ef 2 2 3 3 #include "bench.h" 4 5 // Does a "lock add" on entry and a "lock sub" on exit => 2 atomic instructions making it the most expensive 6 // atomic test. 4 7 5 8 volatile int value; -
benchmark/basic/tls_fetch_add.c
ra21dec4 r525b5ef 3 3 4 4 #include "bench.h" 5 6 // Does not do a fetch & add. It mimics the cfa protocol to disable interrupts locally, by writing true or false to a 7 // thread_local Boolean. This means the entire protocol is just to "mov" instructions making it extremely cheap. 5 8 6 9 #define thread_local _Thread_local -
benchmark/basic/ttst_lock.c
ra21dec4 r525b5ef 3 3 4 4 #include "bench.h" 5 6 // Does a "lock xchg" on entry but a simple "mov" on exit => cheaper as 0 contention. While it has much more code, the 7 // bulk is never run. 5 8 6 9 #define CALIGN __attribute__(( aligned (CACHE_ALIGN) ))
Note: See TracChangeset
for help on using the changeset viewer.