Testing some singleton implementations

luka8088 luka8088 at owave.net
Mon Feb 10 04:51:26 PST 2014


On 10.2.2014. 10:59, Andrej Mitrovic wrote:
> On 2/9/14, luka8088 <luka8088 at owave.net> wrote:
>> dmd -release -inline -O -noboundscheck -unittest -run singleton.d
>>
>> Test time for LockSingleton: 901 msecs.
>> Test time for SyncSingleton: 20.75 msecs.
>> Test time for AtomicSingleton: 169 msecs.
>> Test time for FunctionPointerSingleton: 7.5 msecs.
> 
> C:\dev\code\d_code>test_dmd
> Test time for LockSingleton: 438 msecs.
> Test time for SyncSingleton: 6.25 msecs.
> Test time for AtomicSingleton: 8 msecs.
> Test time for FunctionPointerSingleton: 5 msecs.
> 
> C:\dev\code\d_code>test_ldc
> Test time for LockSingleton: 575.5 msecs.
> Test time for SyncSingleton: 5 msecs.
> Test time for AtomicSingleton: 3 msecs.
> Test time for FunctionPointerSingleton: 5.25 msecs.
> 
> It seems it makes a tiny bit of difference for DMD, but LDC still
> generates better codegen for the atomic version.
> 

Could it be that TLS is slower in LLVM?



More information about the Digitalmars-d mailing list