A sufficiently smart compiler generates i= 1000; j= 1000; for the given code, and no loop instructions at all.