- Click to show recent forum activity -
Join our forums or log in.


Should I add a hardware section?

Should I add a hardware section to the forums? I've been thinking about re-organizing the forums a bit and also seeing about getting some new moderators. Leave comments if you can and let me know. I'd like to get these f...

Getting started with .NET

If you didn't know, you can get a free version of Visual Studio 2008 -- Express Edition is what they call it. If you're interested in doing any kind of .NET programming I would highly recommend getting the free compiler ...

Windows 7 Visual Styles

I thought it'd be a good idea to start building a list of existing visual styles for Windows 7 whether they are located here on these forums or sites like deviantart.com. At the moment it is hard to find some visual styl...

Hi Newbie here!

I hope that I can get lots of insight from the members from this forum. Keep on reading and sharing and thank you for giving your valuable time on me. Keep up the great work! :)...

Related Posts

Spread the word

Digg this post

Bookmark to delicious

Stumble the post

Add to your technorati favourite

Subscribes to this post

3 users responded to this post

Quantumstate-Jim said in February 11th, 2009 at 12:03 pm    

I don’t get the same results. I first ran your executable to get the timings: 25, 20; 28, 27; 26, 25; 27, 28; 28, 27; So basically no difference there.

I then compiled my own using mingw to get the timings: 29, 26; 28, 26; 28, 24; 26, 29; 27,27; so no real differences here either. I also tried enabling the optimization flags but this had no effect.

The visual c++ compiler would not compile the code for me.

Reply

Daniel replied on

Interesting. I wonder if this is due to system specs? What kind of machine do you have? I’m running an Intel Core 2 Quad @ 2.66 ghz / 8 gb of ram with Vista x64. It could possibly be due to the OS as well?

Reply

Quantumstate-Jim replied on

I have a Pentium 4 Willamette processor (2.26Ghz) with 768Mb RAM and XP Home 32 bit.

Reply

Endian said in August 4th, 2009 at 4:21 pm    

To get the code to compile on windows just add .c_str() to testName[0] and testName[1].
I ran this on Windows Server 2008 R1 on Visual C++ 2008 SP2, and ended up with an average of 25ms for printf and 98ms for cout.

Reply

Carl said in August 23rd, 2009 at 9:54 am    

I think there are a few things missing from this test.

1A:
// Don’t be an english snob, make it international:ish.
_tsetlocale( LC_ALL, _T( “” ) );

1B:
and use some _non-english_ letters/characters in the test string ex “日本語” japanese

2:
// run on a single processor in order to get consistent results for all tests.
SetThreadAffinityMask( GetCurrentThread(), 1 );
SetThreadIdealProcessor( GetCurrentThread(), 0 );
Sleep( 1 );

3:
use QueryPerformanceCounter, etc.. not GetTickCount, ask google if you want to know why.

ok, this should make the test more correct.

Reply

Leave Your Comments Below

Currently you have JavaScript disabled. In order to post comments, please make sure JavaScript and Cookies are enabled, and reload the page. Click here for instructions on how to enable JavaScript in your browser.