D - suppression of default initilisation
- Steven Kucera <stevenkucera gmail.com> Nov 07 2011
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <xtzgzorex gmail.com> Nov 07 2011
- Steven Kucera <stevenkucera gmail.com> Nov 07 2011
Hello world, I started to use D on a pet project, and excited that it seems to match C++ in speed. I have a heavily called recursive function, each puts a fix sized array on the stack. The call to memset to init the array slows things down. Is there any way to suppress the automatic initialisation, or might there be in the future, as the optimisation switches don't seem to change it. Regards, Steve Kucera
Nov 07 2011
On 07-11-2011 11:43, Steven Kucera wrote:Hello world, I started to use D on a pet project, and excited that it seems to match C++ in speed. I have a heavily called recursive function, each puts a fix sized array on the stack. The call to memset to init the array slows things down. Is there any way to suppress the automatic initialisation, or might there be in the future, as the optimisation switches don't seem to change it. Regards, Steve Kucera
Initialize it to void, e.g.: int[1024] foo = void; - Alex
Nov 07 2011
Hi,Regards, Steve Kucera
- Alex
Brilliant! Thanks Steve
Nov 07 2011








Steven Kucera <stevenkucera gmail.com>