<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 09/10/2012 03:41 PM, Thomas Lindgren wrote:<br>
<span style="white-space: pre;">>> I started playing with a
simple implementation of MD5 (basically straight from the wiki
page) <br>
>> When the implementation produce the correct output, I did
some timing for fun and also<br>
>> tried to native compile it. <br>
>> To my astonishment I discovered that the code was slower
when native compiled.<br>
>> I am using R15B01 on mac. Can this be true? And in this
case why? <br>
>><br>
>> Note that I do not care to optimize the implementation it
self! I am more interested why<br>
>> the native compiler produce slower code on this example.<br>
><br>
><br>
> On my Mac, the best native result 7% is faster than the best
beam result. But the timing varies by 20% from run to run, so I
think the proper claim is they are about the same. (I also think
Hipe ought to comfortably beat Beam on this sort of code.)<br>
><br>
> Unfortunately, 'pp_native' gave broken/confusing output so
it's hard to trace what happens. The arithmetic looks like it's
being inlined, which ought to provide a boost. There are calls to
r/1 and rotate/2 in the inner loop (md5_/6) which possibly should
have been inlined.</span><br>
Hi,<br>
<br>
Could you post the testcase that you 're timing?<br>
<br>
<br>
Best,<br>
Yiannis<br>
<br>
-- <br>
Yiannis Tsiouris<br>
Ph.D. student,<br>
Software Engineering Laboratory,<br>
National Technical University of Athens<br>
WWW: <a class="moz-txt-link-freetext" href="http://www.softlab.ntua.gr/~gtsiour">http://www.softlab.ntua.gr/~gtsiour</a><br>
<br>
</body>
</html>