Here’s a nice challenge question I got from a very ingenious developer working at Microsoft… now that I’ve found the solution, I thought I should ask it out in the open.
Correct, complete and full answer gets you a nice prize [ie: your name and solution published ;)].
Find the fastest (total cycles) and smallest (total size) method of obtaining the current CPU number that current thread is executing on, on a Windows 2003 or higher computer (ie: this solution can take advantage of any API or system improvements added to NT 5.2+).
Email solutions to aionescu at gmail dot com. Posts questions in the comments if you have any.
There are 31,322 total registered users.
[+] expand