[Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 27 06:33:42 PST 2016


On Sunday, 27 November 2016 at 13:58:29 UTC, Guillaume Piolat 
wrote:
> On Sunday, 27 November 2016 at 13:35:48 UTC, Andrei 
> Alexandrescu wrote:
>>
>>> A useful intermediate step is to have these "[shared] static 
>>> this" ctor
>>> call a function instead, so that programs without druntime 
>>> can call them
>>> too.
>>
>> That would be progress.
>>
>>
>> Andrei
>
> Same story for core.cpuid which is initialized by a shared 
> static constructor.
> https://github.com/dlang/druntime/blob/master/src/core/cpuid.d
>
> It seems the "shared static this" is allowed to break immutable 
> but a function wouldn't. So maybe the variables here should be 
> private __gshared?.

They are in Mir CPUID, but methods are not pure.

https://github.com/libmir/mir-cpuid/blob/master/source/cpuid/x86_any.d


More information about the Digitalmars-d mailing list