is D so slow?

Fawzi Mohamed fmohamed at mac.com
Tue Jun 17 03:08:22 PDT 2008


On 2008-06-17 03:23:54 +0200, "Dave" <Dave_member at pathlink.com> said:

>> 
>> If you use malloc, the default initialization does not take place, the 
>> memory is normally either initialized to 0, or left uninitialized (with 
>> values that likely are not NaN).
>> So your program is fast with malloc, but in fact all this is due to a 
>> bug in the program that you are benchmarking, and using malloc is not 
>> the correct solution, the solution is to initialize all the values that 
>> you use.
>> 
>> Fawzi
>> 
> 
> Good catch...

thanks :)



More information about the Digitalmars-d-learn mailing list