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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How to measure the latency numbers every programmer should know?

3 点作者 pietroppeter超过 1 年前
I have stumbled a few times and in many places on the famous &quot;latency numbers every programmer should know&quot;. From what I understand they were first popularised by Peter Norvig. [0]<p>My question is: how would one go about measuring this kind of numbers? is there a way to actually use some code to make this measurements? even better would be if there was a public repository that one could use to measure some of these numbers.<p>I would also be happy on a repository where you only measure two of those: read 1 MB sequentially from memory or read 1 MB sequentially from disk.<p>[0]: http:&#x2F;&#x2F;norvig.com&#x2F;21-days.html#answers

3 条评论

not_your_vase超过 1 年前
Some comes from datasheets (HDD seek), some comes from pure mathematical calculations (network throughput), and some are kind of &quot;today it might be true for a specific configuration, but in 20 minutes it will be just a random outdated number&quot; (branch misprediction or fetching from memory - these are extrapolated from number of CPU cycles needed to execute them, which also come from datasheets). And of course there are some that can be easily measured with a stopwatch (or code, if you are that kind of person), like network latency.
评论 #37268795 未加载
throwaway888abc超过 1 年前
bpftrace<p><a href="https:&#x2F;&#x2F;github.com&#x2F;iovisor&#x2F;bpftrace">https:&#x2F;&#x2F;github.com&#x2F;iovisor&#x2F;bpftrace</a><p>*for real-world see the tools&#x2F;examples directory<p>and also don&#x27;t miss the refenrce guide<p><a href="https:&#x2F;&#x2F;github.com&#x2F;iovisor&#x2F;bpftrace&#x2F;blob&#x2F;master&#x2F;docs&#x2F;reference_guide.md">https:&#x2F;&#x2F;github.com&#x2F;iovisor&#x2F;bpftrace&#x2F;blob&#x2F;master&#x2F;docs&#x2F;referen...</a>
评论 #37268797 未加载
pietroppeter超过 1 年前
on this topic this is also great: <a href="http:&#x2F;&#x2F;computers-are-fast.github.io" rel="nofollow noreferrer">http:&#x2F;&#x2F;computers-are-fast.github.io</a>