RE: [AD] pack_fwrite and const |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> If a function's parameter is declared `const', then the compiler can
> assume certain optimisations. A trivial (C++) example:
Unfortunately, this is far less than one might think, mainly because
it is legal to cast away constness. Only in trivial examples like the
one you gave is the compiler able to generate better code. In real code
it often has to fallback to a conservative code generation.
--
Lyrian