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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: What do you recommend for optimization and profiling?

3 点作者 westicecoast32将近 5 年前
I&#x27;m writing an app from scratch and I&#x27;d like to pay attention to places where I can optimize and profile things. So far I converted a few important functions to SIMD and wrote my own algorithm for another. The other day I got a tip on branch prediction and realized there&#x27;s more I could learn.<p>Do you have any recommendations for profiling or optimization?

4 条评论

photawe将近 5 年前
You know premature optimization is the root of all evil ;)<p>Personally, I do optimization every now and then, when I see bottlenecks and I see that it hurts the UI. Then you run some profiling tools and optimize those hot paths.<p>Optimizing from the get go will probably end up with you optimizing too much and the benefits will likely be invisible (and worst of all, optimizing will surely take quite a bit of extra time, and you can also end up with buggier code).<p>Having said that, I use dotTrace from JetBraints. It&#x27;s for .net<p>If you expect your project will be complex, I would advise against C&#x2F;C++, since that will complicate stuff even further (note: I&#x27;ve actually done 13 years of C++, so I do know what I&#x27;m talking about). I would recommend C#&#x2F;F# - you&#x27;d be waaay more productive there.
thomas43将近 5 年前
Do you have some more detaile about your app?<p>I use perf, sysprof, trace32, visual studio profiler for profiling, but this highly depends on your environment.<p>These assorted links might be interesting to you:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;Kobzol&#x2F;hardware-effects" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Kobzol&#x2F;hardware-effects</a><p>- <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=FJJTYQYB1JQ" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=FJJTYQYB1JQ</a><p>- <a href="https:&#x2F;&#x2F;godbolt.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;godbolt.org&#x2F;</a><p>- <a href="http:&#x2F;&#x2F;igoro.com&#x2F;archive&#x2F;gallery-of-processor-cache-effects&#x2F;" rel="nofollow">http:&#x2F;&#x2F;igoro.com&#x2F;archive&#x2F;gallery-of-processor-cache-effects&#x2F;</a>
chrisbennet将近 5 年前
For windows I use 2 C++ profilers (memory and speed) from <a href="https:&#x2F;&#x2F;www.softwareverify.com&#x2F;index.php" rel="nofollow">https:&#x2F;&#x2F;www.softwareverify.com&#x2F;index.php</a><p>I like to memory profile on a regular basis. It a is lot easier to catch and fix a memory leak if you discover it soon after you’ve introduced it.
notemaker将近 5 年前
Anyone have experience with coz? The talk made it seem brilliant, but I haven&#x27;t been able to make it work.