对于C廓建议?

编程入门 行业动态 更新时间:2024-10-08 02:21:40
本文介绍了对于C廓建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家总是说,在执行前的优化来分析你的程序,但没有人曾经介绍了如何做到这一点。

Everyone always says to profile your program before performing optimizations but no-one ever describes how to do so.

什么是您的分析C $ C $ç做法?

What are your practices for profiling C code?

推荐答案

使用 GCC ,我编译和链接 -pg (如解释如here),然后通过运行程序(根据还建议在该URL的原则),并使用 gprof的如果你使用不同的编译器和放大器的工具,将改变持续; C,但仍建议该URL,即使这样,对于那些关于如何以及为什么来分析你的code一般概念的部分。

Using gcc, I compile and link with -pg (as explained e.g. here), then continue by running the program (according to the principles also suggested at that URL) and using gprof. The tools will vary if you're using different compilers &c, but the URL is still recommended, even then, for the parts that are about general ideas on how and why to profile your code.

更多推荐

对于C廓建议?

本文发布于:2023-10-23 02:39:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519500.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:建议

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!