Somebody was asking me how fast C++ was compared to C# so I decided to try out a quick heath robinson test to simulate some maths intensive code.
The tests were performed on my 2G p4 laptop with several runs for each.
Visual C++ 6 Release ~ 820ms ( 1560ms Debug)
Visual C++ 7 Release ~ 820ms ( 2864ms Debug)
Visual C# Release ~ 1660ms ( 5718ms Debug)
C++ is still king!and what have they done to VC7 debug builds?
- Numbers picked at random.Code:DWORD dwBefore = timeGetTime(); double d1 = 0.727272; double d2 = 0.26252; double d3 = 343432.232; for(int i=0; i < 100000000; i++) { d3 = d1*d2; d1 = d3*d2; d2 = d2*d2; d3 = d1*d2; d3 = d3*d2; } CString szMsg; szMsg.Format("Time taken: %dms", timeGetTime() - dwBefore); MessageBox(szMsg);
- Yes, this is a very narrow test.
- C# code the same apart from functions used to get the time.
- Timers resolution ~ 10ms.


LinkBack URL
About LinkBacks
and what have they done to VC7 debug builds?
Reply With Quote
.
