TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Lock-Free Algorithms For Ultimate Performance

42 点作者 ari_elle大约 12 年前

5 条评论

colanderman大约 12 年前
Here's one better, if all your data is strictly less than (not equal to) a cache line (usually 64 bytes) in size, and your processor guarantees memory ordering within a cache line (most do):<p>1) Keep head and tail pointers local to the consumer and producer.<p>2) Associate a bit with each entry in the queue which denotes whether the entry is full or not. The bit must live within the same cache line as the entry itself.<p>3) Block on this bit, rather than head &#38; tail pointers.<p>4) Set an entry's bit after filling the entry; clear it before.<p>5) You can now elide the memory fence (implicit in the .lazySet() method of the atomic objects). Performance will skyrocket.
评论 #5506092 未加载
svag大约 12 年前
The presentation in pdf <a href="http://qconsf.com/dl/qcon-sanfran-2012/slides/MartinThompson_LockFreeAlgorithmsForUltimatePerformanceMOVEDTOBALLROOMA.pdf" rel="nofollow">http://qconsf.com/dl/qcon-sanfran-2012/slides/MartinThompson...</a> for off-line viewing.
mgl大约 12 年前
If you interested in HPC topic, especially in terms of HFT, you should his previous presentation on LMAX system: <a href="http://www.infoq.com/presentations/LMAX" rel="nofollow">http://www.infoq.com/presentations/LMAX</a>
exDM69大约 12 年前
Really good presentation, although a bit long.<p>What was most interesting to me was the actual performance figures and the small optimizations that yield big improvements.
cnlwsu大约 12 年前
great presentation