Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

CPP

Name: Anonymous 2011-11-27 10:04

Hi,

is it a good practice to write this #def in cpp?

#define print(X) std::cout<<X<<std::endl

so that it can be used as:

print("what " << "ever" << " I " << "want");

btw.. how do I insert sniplet of code here?

Name: Anonymous 2011-11-27 11:22

>>26
RDTSC is obsolete, and doesn't work as you would expect on modern CPUs that self-adjust the clock frequency to reduce power consumption and maximize performance, like the Core i5/i7 series.

The recommended way on modern x86-64 PC systems for some time has been to use the HPET hardware, which is somewhat more complicated to use because it's a separate chip and requires BIOS support.

http://en.wikipedia.org/wiki/High_Precision_Event_Timer

Name: Anonymous 2011-11-27 11:48

>>28
You completely miss the point. RDTSC actually is a better performance-measurement tool than time precisely because modern CPU can self-adjust their frequency.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List