The short answer is that they are not the same, and the keyboard matters too.
The long answer involves me uploading lots of files from the experimentation I’ve re-done over the past few days. Basically, I’ve repeated the test I performed in this thread–the test by which I determined that my Apple keyboard was precise to 8ms. I’ve also determined how accurate it’s possible this keyboard can be.
I’ve tested two different keyboard under three different operating systems on two different computers. (proof of theory, not extensive test to find the absolute best possible combination.)
Keyboards:
Kensington Slim Type Keyboard Mac
Apple slim keyboard that shipped with the Mac Pro
Computers:
8-core Mac Pro Early '08 w/6GB of RAM
HP Media Center PC m7160n (Pentium D w/1GB of RAM)
Operating Systems:
Mac OS X Leopard 10.5.3 – Installed on the Mac Pro
Windows Vista SP1 – Installed on the Mac Pro (bootcamp)
Windows XP SP3 – Installed on the HP
The process: I created a simple SuperLab experiment that waits until the user presses the space bar to continue. All key presses are recorded. Since USB HID devices are polled at regular intervals, the idea is to stress this polling functionality. While the experiment is waiting for the space bar to be pressed, I pressed other keys at varying speeds, but generally about as fast as I could.
The verbose log provides response times in increments of .01ms (Directions for how to enable this are included here for Windows and here for Mac OS X), so this was the preferred source of data for this experiment. After getting the entire contents of the verbose log into a text file, I ran commands similar to the following UNIX command to extract only the actual response times.
awk ‘/actual/ {print $16}’ Leopard_Kensington_USB.log >& Leopard_Kensington_USB_ms.txt
Using a spreadsheet program (Apple’s Numbers), I computed the differences in time between each of the key presses. In doing this, I found that all times on all operating systems for the Kensington keyboard come in multiples of 16ms. All times on all operating systems for the Apple keyboard come in multiples of 8ms. Therefore, to find the accuracy of a given combination, I performed a modulus of the differences relative to the keyboard’s polling period. These results have been graphed as a histogram.
I’ve also provided graphs of this modulus error with respect to the amount of time since the previous keystroke. This additional visual representation makes both the precision and the accuracy visible in a single graph.
Conclusions:
With respect to reaction times from a USB keyboard, the choice of keyboard makes a far larger difference than the choice of operating system. While OS X has roughly 1/10 the error of Vista, the vast majority of response times on Vista still fall within a 1ms radius of the expected time. Knowing response time with .1ms accuracy is meaningless on a keyboard that can’t get you better precision than 16ms.
Notes:
This only takes into account keyboard accuracy. There are many other factors in a computer system. An important one is whether the refresh time of the monitor is available to applications. Mac OS X fails to retrieve this information from the monitor used for this experiment (a 30" Dell LCD), but Vista succeeded in retrieving this information. In this specific hardware setup, this would introduce an error radius of about 8ms on the Mac which makes the keyboard precision irrelevant. Furthermore, on LCDs, the display’s response time is important, but this information is not available to software.
Leopard Test Results.pdf (45.3 KB)
Vista Test Results.pdf (98 KB)
XP Test Results.pdf (48.9 KB)
Keyboard Test and Data.zip (238 KB)