[Issue 3532] New: benchmark function consumes 100% CPU when used with anonymous delegate
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 20 06:28:04 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3532
Summary: benchmark function consumes 100% CPU when used with
anonymous delegate
Product: D
Version: 2.036
Platform: x86_64
OS/Version: Windows
Status: NEW
Severity: critical
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: vadmyst at gmail.com
--- Comment #0 from Vadym Stetsiak <vadmyst at gmail.com> 2009-11-20 06:28:03 PST ---
Following code, consumes 100% for an infinite period of time.
However, if I use benchmark with predefined function - everything is OK.
The code to reproduce:
import std.date;
void main()
{
ulong[] measures = benchmark!(delegate void()
{
for(int i = 0; i < 100_000; i++)
{
auto res1 = cmp1 == cmp2;
}
})(1, null);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list