当我想要对编译器的性能进行基准测试时,需要使用多少个内核?
我重新排序编译器优化。
我想与 gcc O3 比较输出的性能。
我有一个测试套件。
我需要使用多少个核心来进行基准测试?
我确信它们的可执行文件是不同的。
我用一个单核来测量它们的运行时间,时间同样是相同的。
但我不限制核心数量来衡量运行时间,我的编译器的可执行文件比 gcc O3 更快。
如何确定哪个编译器更好?
I reorder the compiler optimization.
And I want to compare the performance of the output with gcc O3.
I have a test-suite.
How many cores do I need to use for benchmark?
I'm sure that the executable files of them are different.
And I use one single core to measure the run time of them, the time is similarly same.
But I don't limit the number of cores to measure the run time, the executable from my compiler is faster than gcc O3.
How can I determine which compiler is better?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题
当我想要对编译器的性能进行基准测试时,我需要使用多少个内核?
嗯,越多越好。正如您提到的,绝对不推荐使用单核。既然您提到了 gcc,那么您就必须研究 GCC 基准测试。
然而,在前面提到的“越多越好”的背景下,请注意“收益递减法则”,正如本答案如下:
Question
How many cores do I need to use when I want to benchmark the performance of my compiler?
Well, the more the merrier. Single-core as you mentioned is definitely not recommended. Since you have mentioned gcc, you have to look into GCC benchmarks.
However, in the context of aforementioned "the more the merrier" beware of "law of diminishing return" as rightly put by this answer below: