alloca is slow and dangerous

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Jan 3 23:05:57 UTC 2021


On Sunday, 3 January 2021 at 20:59:00 UTC, welkam wrote:
>> MS has already stated that they want to do this in C++.
> Not only MS but also linux people want default initialize 
> everything so they both put effort in compilers to improve 
> optimizations so they dont pay performance penalty where they 
> should not. And in the end we benefit too.

The standard approach in PL design is to either default 
initialize or to statically establish that variables are not used 
until initialized (better, but more tricky). C++ was just a small 
addition to C, so that is where the semantics come from. C is the 
outlier here, not the norm...



More information about the Digitalmars-d mailing list