compile-time initialization of objects need?

Christopher Wright dhasenan at gmail.com
Sun Dec 28 22:08:45 PST 2008


Weed wrote:
> Christopher Wright пишет:
>> Weed wrote:
>>> It not syntactic sugar. I suggest not to waste time at all performance
>>> on run-time initialization of objects and check of side conditions on a
>>> course of performance of the program.
>> Sorry, syntactic sugar and some minor optimizations.
> 
> 
> These of optimization are very important when the program contains many
> objects for mathematics.

If the object is mutable, you still need to get it into writable memory. 
If the computation is cheap enough that it's reasonable to do at compile 
time, copying will be a major cost. Therefore this optimization is not 
very important.



More information about the Digitalmars-d mailing list