On Sunday, 9 February 2014 at 12:20:54 UTC, luka8088 wrote:

What about swapping function pointer so the check is done only once per thread? (Thread is tldr so I am sorry if someone already suggested this)

That is an interesting idea indeed, though it seems to be faster only for dmd. I haven't studied the assembly yet, but with LDC I don't see any noticeable difference between SyncSingleton and FunctionPointerSingleton.

Reply via email to