Maybe we could get LDC added to the "User List", under "Open Source Projects"? <br><br>""<br>LDC - LLVM D Compiler<br>Compiler for the D programming language using LLVM as backend.<br><a href="http://www.dsource.org/projects/ldc">http://www.dsource.org/projects/ldc</a><br>
""<br><br>Something like that :)<br><br><div class="gmail_quote">On Tue, Oct 28, 2008 at 7:32 AM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><br><div><div class="Ih2E3d"><div>On Oct 27, 2008, at 11:03 PM, Kelly W wrote:</div>
<br><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div link="blue" vlink="purple" lang="EN-US">
<div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hello everyone,</span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;">
<font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Arial" size="2"><span style="font-size: 10pt; 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):</span></font></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Go to <a href="http://digitalmars.com/" target="_blank">digitalmars.com/</a> webnews/ newsgroups.php?renew=1 and search for: "</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">D slower than C++ by a factor of _two_ for simple raytracer (gdc)"</span></font></div>
</div></div></span></blockquote><div><br></div></div>Wow, very very nice! Have you pointed this out to the other D users?</div><div><br></div><div>-Chris</div><div><br><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div link="blue" vlink="purple" lang="EN-US">
<div class="Ih2E3d"><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"></span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;">
<font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> </span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; 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.</span></font></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; 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</span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> </span></font></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; 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.</span></font></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> </span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; 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).</span></font></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> </span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">Just thought I would let people know,</span></font></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">K.Wilson</span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;">
<font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> </span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; 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 face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"></span></font></div>
</div></div>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" style="color: blue; text-decoration: underline;" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" style="color: blue; text-decoration: underline;" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></span></blockquote></div><br></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br>