Void pointers

Alex via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 17 01:45:44 PDT 2016


On Tuesday, 17 May 2016 at 08:16:15 UTC, Rene Zwanenburg wrote:
> On Tuesday, 17 May 2016 at 06:55:35 UTC, Alex wrote:
>> with dmd test44.d -release
>> the results are:
>
> You may want to pass '-O -inline' as well. -O enables general 
> optimizations, -inline enables function inlining.
>
> -release is for disabling bounds checks, invariants, asserts..
>
> The -debug and -release switches influence the language's 
> behavior. -O and -inline are optimization switches and should 
> not change the behavior of your program, codegen bugs aside ^^
>
> Additionally, some people recommend never using -release. It 
> depends on that type of program you're writing, but the 
> performance gain is often not worth the loss in safety. Think 
> of the number of exploits enabled by C's lack of bounds 
> checking.

ok... now the speed results are exact the same...
so...
besides
void*, ubyte*, a pointer to a strange, not constructible struct, 
I could take a iota too...




More information about the Digitalmars-d-learn mailing list