Author: James Robertson
Date: 09:11:52 01/14/02
Here are several questions I've been wondering about:
1) How does one insert inline assembler statements into your code such that it
can be compiled by gcc (obviously __asm doesn't work)?
2) How is switch() code generated? For instance, if the compiler encounters:
switch (var) {
case 0: do_stuff0(); break;
case 1: do_stuff1(); break;
case 2: do_stuff2(); break;
}
will more efficient code be generated than if I write:
switch (var) {
case 297: do_stuff287; break;
case 0: do_stuff0; break;
case 9000: do_stuff9000; break;
}
If so, what does the compiler do to take advantage of the fact that 0, 1, and 2
are consecutive numbers?
3) How much overhead is added to a function call from a function pointer? Maybe
none? How about if you index an array of function pointers?
4) What are the syntax differences between console code written for Linux versus
Unix (I don't have easy access to a Unix machine)?
5) Just out of curiousity, when is VC7 being released?
Ok, If anyone could help me with these I'd be grateful.
Thanks!
James
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.