www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - The State of LDC on Windows

reply "David Nadlinger" <code klickverbot.at> writes:
Hi all,

As some of you might already know, LDC has come dangerously close 
to being usable on Win32/MinGW recently.

I just posted a small writeup describing the current situation to 
my blog: 
http://klickverbot.at/blog/2013/05/the-state-of-ldc-on-windows/

Alpha-quality binary packages are available as part of 0.11.0 
Beta 3: 
http://forum.dlang.org/post/mailman.871.1370475122.13711.digitalmars-d-ldc puremagic.com

David
Jun 05 2013
next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
David Nadlinger:

 I just posted a small writeup describing the current situation 
 to my blog: 
 http://klickverbot.at/blog/2013/05/the-state-of-ldc-on-windows/
It gives me a "page not found" Bye, bearophile
Jun 05 2013
parent reply "David Nadlinger" <code klickverbot.at> writes:
On Thursday, 6 June 2013 at 00:05:03 UTC, bearophile wrote:
 It gives me a "page not found"
Whoops, I absentmindedly updated the time stamp, without noticing that it actually caused the month to change. Should be fixed now. David
Jun 05 2013
parent "bearophile" <bearophileHUGS lycos.com> writes:
David Nadlinger:

 Whoops, I absentmindedly updated the time stamp, without 
 noticing that it actually caused the month to change. Should be 
 fixed now.
The page works now. I'll try this LDC2. For Windows I suggest to distribute a single 7zip that contains both ldc and the needed gcc libs (possibly only the essential parts of gcc that are necessary). On Windows32 I often use this MinGW, that's updated often and contains Boost and other goodies, I don't know if this is good enough for LDC2: http://nuwen.net/mingw.html Bye, bearophile
Jun 05 2013
prev sibling next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
David Nadlinger:

 Alpha-quality binary packages are available as part of 0.11.0 
 Beta 3: 
 http://forum.dlang.org/post/mailman.871.1370475122.13711.digitalmars-d-ldc puremagic.com
I have done few small tests: With no optimization dmd compiles about twice faster (or more) than ldc2. When I want optimizations with this ldc I have used "-release -profile-verifier-noassert -O5". Is this good enough? I don't know why ldc2 doesn't have "-noboundscheck". - - - - - - - - - - - - Regarding run time performance of the D code, if Walter is interested I have seen this code is about 6 times faster compiled with ldc2 compared to dmd: import core.stdc.stdio, std.random, std.conv; void main(in string[] args) { immutable uint N = (args.length == 2) ? args[1].to!uint : 1_000; auto rng = Xorshift(0); uint total = 0; for (uint i = 0; i < N; i++) total += uniform(0, 10, rng); printf("%u\n", total); } If I replace this line: total += uniform(0, 10, rng); with: total += rng.front; rng.popFront; Then the code compiled with ldc2 is only about 30% faster or so. Bye, bearophile
Jun 05 2013
next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
 I have seen this code is about 6 times faster compiled with 
 ldc2 compared to dmd:
I run it with 100000000 command line argument. Bye, bearophile
Jun 05 2013
prev sibling parent Marco Leise <Marco.Leise gmx.de> writes:
Am Thu, 06 Jun 2013 03:47:58 +0200
schrieb "bearophile" <bearophileHUGS lycos.com>:

 When I want optimizations with this ldc I have used "-release 
 -profile-verifier-noassert -O5". Is this good enough?
 I don't know why ldc2 doesn't have "-noboundscheck".
As fas as I know O4/O5 is currently not implemented and often putting -O (meaning -O2) is just as good as -O3. -release already disables bounds-checks like id does in dmd for non- safe code. That said, every option that has an "enable" flag can be inverted: -enable-boundscheck becomes -disable-boundscheck Yes, your set of options is ok. :) -- Marco
Jun 05 2013
prev sibling next sibling parent reply "Don" <turnyourkidsintocash nospam.com> writes:
On Wednesday, 5 June 2013 at 23:45:02 UTC, David Nadlinger wrote:
 Hi all,

 As some of you might already know, LDC has come dangerously 
 close to being usable on Win32/MinGW recently.

 I just posted a small writeup describing the current situation 
 to my blog: 
 http://klickverbot.at/blog/2013/05/the-state-of-ldc-on-windows/

 Alpha-quality binary packages are available as part of 0.11.0 
 Beta 3: 
 http://forum.dlang.org/post/mailman.871.1370475122.13711.digitalmars-d-ldc puremagic.com

 David
This is great news! There's an often-repeated error in there. Borland cannot possibly have patented Structured Exception Handling -- it was invented by Microsoft, not by Borland. Of course anybody can claim a patent *related* to SEH, or that uses SEH in some way, but that's not the same thing as inventing it. I don't know if Microsoft ever had any patents on SEH, but if they did, they must have expired long ago.
Jun 06 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-06-06 10:38, Don wrote:

 This is great news!
 There's an often-repeated error in there. Borland cannot possibly have
 patented Structured Exception Handling -- it was invented by Microsoft,
 not by Borland. Of course anybody can claim a patent *related* to SEH,
 or that uses SEH in some way, but that's not the same thing as inventing
 it.
 I don't know if Microsoft ever had any patents on SEH, but if they did,
 they must have expired long ago.
That might be the case. But I don't think that matters as long as you can't convince the LLVM developers to implement support for SEH. -- /Jacob Carlborg
Jun 09 2013
prev sibling parent Benjamin Thaut <code benjamin-thaut.de> writes:
Am 06.06.2013 01:45, schrieb David Nadlinger:
 Hi all,

 As some of you might already know, LDC has come dangerously close to
 being usable on Win32/MinGW recently.

 I just posted a small writeup describing the current situation to my
 blog: http://klickverbot.at/blog/2013/05/the-state-of-ldc-on-windows/

 Alpha-quality binary packages are available as part of 0.11.0 Beta 3:
 http://forum.dlang.org/post/mailman.871.1370475122.13711.digitalmars-d-ldc puremagic.com


 David
I really appreciate that you support windows now. I need a compiler with a good optimizer on windows and the last stable gdc version is at the level of dmd 2.060. As soon as I find some time I will port my modified druntime so it works with ldc. If I find bugs I will file them. -- Kind Regards Benjamin Thaut
Jun 06 2013