Hacker News new | past | comments | ask | show | jobs | submit login

Haha was wondering if I could try to make sense of it... couldn't, saw your post, decided to take another look at the origin.

For anyone interested it sums all integers from 1 to 1000. Written as a benchmark for different languages.

Maybe the terminator was running a benchmark in those scenes :P




Power-On-Self-Test (POST) calibration loop or training.

Not as far fetched. RDRAM does something similar when it comes online: it has to "train" the physical link every time the system is booted by generating bogus traffic and timing it (and can also retrain on certain errors). Complicated stuff, RDRAM. Also, anything with a differential pair may employ training like this.

As I type this, I am -literally- in the process of writing a self-timing loop using a binary increase of iterations to find average execution time plateau.


Another area is real-time profiling on cpus with stepping support - I run a loop like that every 2-3 sec to figure out the actual Instructions Per Second at current stepping. Applicable both to desktop and mobile CPUs nowadays.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: