Lite-C is not based on C or C++, it provides a full ANSI C compiler, so every ANSI C code will compile on the GS compiler as well. But Lite-C offers additional functionality like the automaticc detection of pointers, which is neither to be found in C nor in C++.

I can't give you any information on cpu cycles a certain instruction uses. But you already made a pretty good guess when writing them down. Fastest instructions are bit shifting and binary operators like <<, >>, |, & etc. The arithmetical operators like +, -, / and * will be slower but even very very fast. The exectuion speed of this also depends on the operands you use with them. The if condition will be again one step slower. The for loop depends on the number of iterations, the use of a already defined variable for iterating, the content of the body of the loop and the like. So you can't give a general rule for that. The most costly thing is of course calling a function like abs.

To be not misunderstood: all of the above is lightning fast. In terms of the manual they are all very very very fast. I do not recommend to optimize your code on this level as you write it. One does better to write readable, well organized and documented code.

One of the most important rules for programmers: Don't optimize before it's too slow.


Always learn from history, to be sure you make the same mistakes again...