Hi, all

I'm encountering strange behavior when using anonymous delegates with bechmark 
function. In my case benchmark hangs and consumes 100% CPU.

I'm using D2.

Here's the code:
import std.date;

void main()
{
        ulong[] measures = benchmark!(delegate void() 
        {
                for(int i = 0; i < 100_000; i++)
                {
                        auto res1 = cmp1 == cmp2;
                }
                
        })(1, null);
}

OTOH, when instead of anonymous delegate i use predefined function, benchmarks 
works just fine.

What I'm missing?

Reply via email to