alloca is slow and dangerous

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Jan 1 14:53:01 UTC 2021


On Friday, 1 January 2021 at 14:48:11 UTC, welkam wrote:
> Over the years I saw several people asking why D doesn't have 
> alloca. I just want to share a video where it states that 
> alloca is slower than static array

13% slower is nothing compared to the alternative which is malloc 
or running out of stack (which will happen real fast if you keep 
piling up worst case fixed size).



More information about the Digitalmars-d mailing list