On Friday, 7 February 2014 at 04:06:40 UTC, Jerry wrote:
"Stanislav Blinov" <stanislav.bli...@gmail.com> writes:

Here's my latest revision: http://dpaste.dzfl.pl/5b54df1c7004

Yup, that helps out the AtomicSingleton a lot. Here's best and worst times for each for dmd and gdc:

Cool, I almost started to research that CPU of yours :)

jlquinn@wyvern:~/d/tests$ ~/dmd2/linux/bin64/dmd -O -release -inline -unittest singleton2.d
jlquinn@wyvern:~/d/tests$ ./singleton2
*Test 2 time for SyncSingleton: 585.992 msecs.
Test 2 time for AtomicSingleton: 1189.03 msecs.

Test 5 time for SyncSingleton: 796.834 msecs.
*Test 5 time for AtomicSingleton: 1069.08 msecs.

*Test 7 time for SyncSingleton: 811.711 msecs.
Test 7 time for AtomicSingleton: 1263.36 msecs.

Test 9 time for SyncSingleton: 605.729 msecs.
*Test 9 time for AtomicSingleton: 2173.74 msecs.

jlquinn@wyvern:~/d/tests$ ../bin/gdc -O3 -finline -frelease -fno-bounds-check -funittest singleton2.d
jlquinn@wyvern:~/d/tests$ ./a.out
Test 0 time for SyncSingleton: 542.797 msecs.
*Test 0 time for AtomicSingleton: 257.805 msecs.

*Test 5 time for SyncSingleton: 620.052 msecs.
Test 5 time for AtomicSingleton: 248.951 msecs.

Test 7 time for SyncSingleton: 437.124 msecs.
*Test 7 time for AtomicSingleton: 605.781 msecs.

*Test 8 time for SyncSingleton: 252.643 msecs.
Test 8 time for AtomicSingleton: 279.854 msecs.

Nice.

Reply via email to