[fpc-pascal] A question about sets performance
pascaldragon at googlemail.com
Tue Feb 1 09:56:25 CET 2011
Am 31.01.2011 22:59, schrieb Jeppe Johansen:
> It's true that the semantics are the same, and it would probably make
> sense to do some optimizations on typed constants that aren't ever
> written to(the FPC rtl "abuses" the typed constant variable property in
> the heap manager code, for example)
I wouldnˈt consider this an abuse as type constants were intended to be
"static local variables" when they were introduce.
count: Integer = 0;
The value of "count" will increase throughout the run, but it won't be
visible to other functions/procedures outside this routine (this goes
back to the time when Pascal had no units to introduce private variables).
More information about the fpc-pascal