Comment by wpollock
16 hours ago
The PDP-11 that C originally targeted had address modes to support the stack. Pre-increment and post-decrement therefore did not require a separate instruction; they were free. After the PDP-11 went the way of the dodo, both forms took a machine cycle so it (mostly) became a stylistic issue. (The two operators have different semantics, but the trend to avoid side-effects in expressions means that both are most often used in a single expression statement like "++x;" or "x++;", so it comes down to your preferred style.)
Please explain what you mean by "a separate instruction".
Some idiomatic C code to copy a string (I'm not saying this is good C code, but it's just an example):
On the Motorola 68000 (based somewhat on the PDP-11) the code would look like:
while on the x86 line, it would be:
Yes, there are better ways to write that code for both the 68K and x86, but I hope this gets the point across.