JK> Now my question is, does the compiler treat
JK> "sizeof(StructName);" as a constant? During compile time
JK> will it look up the size of the stuct and simply use that
JK> number instead of calculating the size of the stucture
JK> each time?
Why don't you write a little program to test the time it
takes to find sizeof(int) and compare the results to
finding sizeof(MyStruct)?
It should add sizeof(MyStruct) to a table of values and the
lookup time should be equal if it does not calculate it on
every call.
My tests seem to indicate that they take the same ammount
of time.
> ] I'm so relieved... My IQ test came back negative...........
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|