首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX 提问指南
广告
V2EX
›
问与答
C++社区一般怎么确定性能瓶颈在哪儿?
plantain
·
2015-03-16 14:45:12 +08:00
· 1515 次点击
这是一个创建于 3493 天前的主题,其中的信息可能已经有所发展或是发生改变。
我用 C++和 C#分别计算从 1 皇后到 12 皇后,都有哪些解,结果 C#用了 3.1-3.2 秒,用 C++写的竟然用到了了 17.6-17.9 秒,我是用 std:vector 来收集结果的,是这个产生的性能问题吗?
C++版本代码:
https://github.com/plantain-00/c-demo/blob/master/EightQueens/EightQueens/main.cpp
C#版本代码:
https://github.com/plantain-00/csharp-demo/blob/master/SevenQueens/Program.cs
当然了,是在同一台机器上跑的。
目前尚无回复
c++
皇后
代码
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
733 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms ·
UTC 21:27
·
PVG 05:27
·
LAX 14:27
·
JFK 17:27
Developed with
CodeLauncher
♥ Do have faith in what you're doing.