Re: [Dev-C++] #DEFINE versus cont variables in array inicializations
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-05-29 21:30:50
|
For comparing size of code - either go for the map file, or look at the assembler output. The exe file size isn't interesting. A look at the assembler output also shows the difference between fast, slow, big, small, ... code. Extra memory references are almost always bad. Extra bytes of code might not be expensive, as long as the processor have bandwidth enough - for example in a loop small enough to fit in the L1 cache, the processor doesn't consume any code bandwidth after the first iteration. In such a case, a larger code block might actually be faster by removing an extra access to a memory location. /Per W On Thu, 29 May 2003, OROSZI Bal=E1zs wrote: > Ioannis Vranos wrote: > > 29/05/2003 11:09 ?? 23.036 temp.exe > > ... > > 29/05/2003 11:10 ?? 23.036 temp.exe > > > > So the compiler optimises out the const int thing. > > Are you sure if size is the same, exe is same? Look at the contents of > it with a comparison program. gcc works in blocks or what, so 2 totally > different programs might have the same size. > > -- > Greetings, > Bal=E1zs > > > > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay! > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |