[rosedu-general] C++ la CDL (Was: [CDL] Prezentări)
Vlad Dogaru
ddvlad at rosedu.org
Wed Aug 10 20:38:53 EEST 2011
On 8/10/2011 9:32 AM, Silviu Popescu wrote:
>> Prima variantă merge oricând AFAIK. De ce să mai folosești și pragma
>> dacă nu e portabil?
> From [1]:
> "Using #pragma once instead of include guards will typically increase
> compilation speed since it is a higher-level mechanism; the compiler
> itself can compare filenames or inodes without having to invoke the C
> preprocessor to scan the header for #ifndef and #endif.
>
> Some compilers such as GCC and Clang include special speedup code to
> recognize and optimize the handling of include guards, and thus little
> or no speedup benefit is obtained from the use of #pragma once."
Tare, eu nu știam că e mai eficient. You learn something new every day.
Vlad
More information about the rosedu-general
mailing list