<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello everyone,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I just thought I would let people here know that ldc (llvm
backend for the D Programming Language) is getting pretty usable (a few larger
libraries compile) and it now has x86-64 support added. I decided to run some
timings on some D and C++ code to compare ldc to dmd (the mainline compiler), gdc
(the gcc based D compiler) and g++. I used a ray tracing program found in this
thread (make sure to use the code mentioned later in the thread as it has some optimizations):<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Go to digitalmars.com/ webnews/ newsgroups.php?renew=1 and search
for:  “</span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>D slower than C++ by a factor of
_two_ for simple raytracer (gdc)”<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>There are versions of the tracer for D and C++ that are
quite comparable. Here are some timings I got on an AMDx86-64 running Fedora
Core Linux. Timings are averaged over 6 runs.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>llvm-g++4.0.1   5.76   (build 5449..backend
from svn today)<br>
ldc-rev736      6.68<br>
g++4.1.2        6.72<br>
gdc0.24         7.45<br>
g++4.3.1        7.66<br>
dmd1.030        14.52<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>As you can see D is NOT that much slower for the ray
tracer, when using the proper compiler and options ;)  Dmd doesn’t
optimize very well here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>I think LLVM performs quite admirably here and I am glad
ldc uses it for a backend. The thread mentions the optimizations used for each
compiler (ldc uses the same options as dmd).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>Just thought I would let people know,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>K.Wilson<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>P.S. I am not sure if this counts as another “supported
language” for LLVM yet, but I think it is getting close.</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

</div>

</body>

</html>