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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Assembly Optimization Tips by Mark Larson (2004)

49 点作者 htfy966 个月前

6 条评论

shiroiushi6 个月前
This article title should have &quot;(2004)&quot; added; this is seriously old information.<p>For modern use, something about ARM CPUs would be much more useful since that&#x27;s what microcontrollers all use now. No one&#x27;s doing ASM programming on x86 CPUs these days (and certainly not Pentium4 CPUs).
评论 #42144970 未加载
评论 #42145250 未加载
评论 #42148579 未加载
ghaff6 个月前
A fascinating peek into the fairly deep past (sigh) is Abrash&#x27;s The Zen of Assembly language. Time pretty much overtook a planned Volume 2 but the Volume 1 is still a pretty fascinating read for a time when tweaking optimization for pre-fetch queues and the like was still a thing.
mshockwave6 个月前
&gt; (Intermediate)1. Adding to memory faster than adding memory to a register<p>I&#x27;m not familiar with Pentium but my guess is that memory store is relatively cheaper than load in many modern (out-of-order) microarchitectures.<p>&gt; (Intermediate)14. Parallelization.<p>I feel like this is where compilers come into handy, because juggling critical paths and resource pressures at the same time sounds like a nightmare to me<p>&gt; (Advanced)4. Interleaving 2 loops out of sync<p>Software pipelining!
fwip6 个月前
Looks like this was written in 2004, or thereabouts.
评论 #42143867 未加载
ynoxinul6 个月前
&gt; If you have a full 32-bit number and you need to divide, you can simply do a multiply and take the top 32-bit half as the result.<p>Can someone explain how this can work? Obviously, you can&#x27;t just multiply the same numbers instead of dividing.
评论 #42145886 未加载
optymizer6 个月前
What&#x27;s a good resource like this for modern CPUs (especially ARM)?
评论 #42145910 未加载
评论 #42145273 未加载