News for hackers. Stuff that matters.
Re:Friction Between Programming Professionals and Beginners by speeder on Wednesday February 10, 2016 @11:38AM (#11073893)
What you do when the accumulated knowledge, is wrong?

Example: I've been getting hostile responses on StackOverflow when asked about RDTSC and MS QPC, and about some strange behaviour of XCode compiler.

Found out that both MS and Apple has wrong documentation, and that XCode compiler indeed does things differently than the official LLVM distribution (And way different from the published Obj-C standard).

How I am supposed to know that without asking someone that already knows?

Re:Friction Between Programming Professionals and Beginners by ktRolster on Wednesday February 10, 2016 @12:49PM (#11074465)

   > How I am supposed to know that without asking 
   > someone that already knows?
A good idea is to ask the answerer how he/she figured it out.

Usually when I run into compiler bugs, I look at the assembly output to make sure.

I don't know why you were messing with RDTSC, but usually when I need a high resolution timer I use clock_gettime() or gettimeofday(). The former doesn't work on OSX, but the latter does, and mach_absolute_time() or clock_get_system_nanotime() seem to work on OSX if you really need them.