[mercury-users] Strange performance anomaly; can anyone confirm?

Chris King colanderman at gmail.com
Mon Mar 28 15:16:05 AEDT 2011


While writing an n-queens implementation I encountered an anomaly
whereby simply wrapping the body of a predicate in a dummy if/then
causes a 2x speedup.  My code is attached (trimmed down as much as
possible), can anyone confirm?  I'm testing in the asm_fast.gc grade
on amd64.

My presumption is simply that the conditional is causing some
optimization to be triggered, but -O 6 doesn't seem to make a
difference.  Any thoughts?

Thanks,
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: n_queens_bugged.m
Type: application/octet-stream
Size: 865 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20110328/d7bccc50/attachment.obj>


More information about the users mailing list