Logging Without the Lock Contention Tax

Greg Law demonstrated a logging library achieving 1 nanosecond latency in single-threaded cases by eliminating string manipulation at log time. Traditional fprintf takes 133 nanoseconds and includes a lock that serializes all threads. Speed log suffers from the same mutex contention. Law’s L3 library uses fixed-size records with string pointers, writing only to memory-mapped buffers with atomic operations. Post-processing resolves pointers using RO data section offsets. The approach scales dramatically better with thread count since writers never block each other.

Exception Performance: From Microseconds to Hundreds of Nanoseconds

Khalil Estell cut C++ exception propagat…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help