Fred N. van Kempen wrote:
On Fri, 14 Nov 2003, Hans Franke wrote:
BTW: above example is exactly one thing why I hate
C.
basicly every compiler will generate a stupid loop, while
in assembly a REP STOSW would do the trick at maximum
speed possible.
Thats why we invented code peeking and code optimiziers,
Hans. A decent optimizer for x86 *will* know to replace
that loop with a REP-prefixed instruction.
--f
But the REP prefix has a bug, on the early machines if
I remember reading right, is you can't have interupts
enabled. OH wait, you only could run DOS and you did not
need NO STINKING INTERUPTS!, and serial lines ran faster than
300 baud!