Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Rainer Schuetze
On 02.08.2013 00:36, Walter Bright wrote: I've now upgraded dmc so dmd builds can take advantage of improved code generation. http://www.digitalmars.com/download/freecompiler.html Although my laptop got quite a bit faster overnight (I guess it was throttled for some reason yesterday),

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Walter Bright
On 8/2/2013 12:57 AM, Rainer Schuetze wrote: http://www.digitalmars.com/download/freecompiler.html Although my laptop got quite a bit faster overnight (I guess it was throttled for some reason yesterday), relative results don't change: std.algorithm -main -unittest dmc85?: 12.5 sec dmc857:

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Rainer Schuetze
On 02.08.2013 10:24, Walter Bright wrote: On 8/2/2013 12:57 AM, Rainer Schuetze wrote: http://www.digitalmars.com/download/freecompiler.html Although my laptop got quite a bit faster overnight (I guess it was throttled for some reason yesterday), relative results don't change:

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Richard Webb
On 01/08/2013 00:32, Walter Bright wrote: Thanks for doing this, this is good information. On 7/31/2013 2:24 PM, Rainer Schuetze wrote: I have just tried yesterdays dmd to build Visual D (it builds some libraries and contains a few short non-compiling tasks in between): Debug build dmd_dmc:

Re: dmc 8.57 now available for download

2013-08-02 Thread bearophile
Walter Bright: Yes, unless I screwed it up again. It works now, thank you. Bye, bearophile

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Dmitry Olshansky
31-Jul-2013 22:20, Walter Bright пишет: On 7/31/2013 8:26 AM, Dmitry Olshansky wrote: Ouch... to boot it's always aligned by word size, so key % sizeof(size_t) == 0 ... rendering lower 2-3 bits useless, that would make straight slice lower bits approach rather weak :) Yeah, I realized that,

Re: DScanner is ready for use

2013-08-02 Thread Tofu Ninja
On Saturday, 27 July 2013 at 22:27:35 UTC, Brian Schott wrote: DScanner is a tool for analyzing D source code. It has the following features: * Prints out a complete AST of a source file in XML format. * Syntax checks code and prints warning/error messages * Prints a listing of modules

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Daniel Murphy
Rainer Schuetze r.sagita...@gmx.de wrote in message news:ktbvam$dvf$1...@digitalmars.com... large-address-aware). This shows that removing most of the allocations was a good optimization for the dmc-Runtime, but does not have a large, but still notable impact on a faster heap implementation

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Leandro Lucarella
Walter Bright, el 30 de July a las 11:13 me escribiste: On 7/30/2013 2:59 AM, Leandro Lucarella wrote: I just want to point out that being so much people getting this wrong (and even fighting to convince other people that the wrong interpretation is right) might be an indication that the

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Walter Bright
On 8/2/2013 2:47 AM, Rainer Schuetze wrote: My disassembly looks exactly the same. I don't think that a single div operation in a rather long function has a lot of impact on modern processors. I'm running an i7, according to the instruction tables by Agner Fog, the div has latency of 17-28

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Walter Bright
On 8/2/2013 8:18 AM, Daniel Murphy wrote: On a related note, I just tried replacing the two ::malloc calls in rmem's operator new with VirtualAlloc and I get a reduction from 13 seconds to 9 seconds (compiling dmd std\range -unittest -main) with a release build of dmd. Hmm, very interesting!

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Walter Bright
On 8/2/2013 6:16 AM, Dmitry Olshansky wrote: 31-Jul-2013 22:20, Walter Bright пишет: On 7/31/2013 8:26 AM, Dmitry Olshansky wrote: Ouch... to boot it's always aligned by word size, so key % sizeof(size_t) == 0 ... rendering lower 2-3 bits useless, that would make straight slice lower bits

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Andrei Alexandrescu
On 2013-08-02 15:44:13 +, Leandro Lucarella said: I'm not say is right or wrong for people to have this reflex of thinking about multipliers, I'm just saying if you care about transmitting the message as clear as you can, is better to use numbers everybody can intuitively think about. And

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Peter Alexander
On Friday, 2 August 2013 at 17:16:30 UTC, Andrei Alexandrescu wrote: On 2013-08-02 15:44:13 +, Leandro Lucarella said: I'm not say is right or wrong for people to have this reflex of thinking about multipliers, I'm just saying if you care about transmitting the message as clear as you can,

Re: DScanner is ready for use

2013-08-02 Thread Brian Schott
On Friday, 2 August 2013 at 13:52:14 UTC, Tofu Ninja wrote: Any idea on when we might see json output(i am not a fan of xml)? Roughly the same time somebody submits a pull request. I'm currently focusing my spare time on DCD, so the JSON output will happen after I'm able to get

Re: DScanner is ready for use

2013-08-02 Thread Tofu Ninja
On Friday, 2 August 2013 at 18:01:01 UTC, Brian Schott wrote: On Friday, 2 August 2013 at 13:52:14 UTC, Tofu Ninja wrote: Any idea on when we might see json output(i am not a fan of xml)? Roughly the same time somebody submits a pull request. I'm currently focusing my spare time on DCD, so

Re: DScanner is ready for use

2013-08-02 Thread Brian Schott
On Friday, 2 August 2013 at 18:12:15 UTC, Tofu Ninja wrote: I will look into adding it my self if I get some time, but I don't think I will need to use this for a while. For what I want it for, there is a lot of legwork to be done before I get around to needing this. The XML output is

Re: dmc 8.57 now available for download

2013-08-02 Thread Michael
On Thursday, 1 August 2013 at 22:32:09 UTC, Walter Bright wrote: http://www.digitalmars.com/download/freecompiler.html Using it to compile dmd for win32 will result in a faster dmd. Change log?

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Rainer Schuetze
On 02.08.2013 18:37, Walter Bright wrote: On 8/2/2013 2:47 AM, Rainer Schuetze wrote: My disassembly looks exactly the same. I don't think that a single div operation in a rather long function has a lot of impact on modern processors. I'm running an i7, according to the instruction tables by

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Andrei Alexandrescu
On 8/2/13 10:44 AM, Peter Alexander wrote: Not to speak on Leandro's behalf, but I think the obvious answer is Reduced compile times by 43%. It's much more useful to express it that way because it's easier to apply. Say I have a program that takes 100 seconds to compile. Knowing that the

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Bill Baxter
Well put, you two. Exactly the same point I was trying to make, only to get accused of spouting baloney. ---bb On Fri, Aug 2, 2013 at 10:44 AM, Peter Alexander peter.alexander...@gmail.com wrote: On Friday, 2 August 2013 at 17:16:30 UTC, Andrei Alexandrescu wrote: On 2013-08-02 15:44:13

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread user
Ha ha, I am a design/controls engineer who deals with speeds and accelerations on a daily basis and yet I was also confused by Walter's statement. I guess the confusion arises from what one expects (as opposed to understands) by the word speed in the given context. In the context of

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread user
I am OK with the existing definition of speed, but would like to see the definition mentioned somewhere at the top. speed = lines_compiled/sec. Even though its obvious to some people, it not to me! I guess that's why all the technical docs I write have a explicit definitions section at the

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Leandro Lucarella
Andrei Alexandrescu, el 2 de August a las 10:16 me escribiste: On 2013-08-02 15:44:13 +, Leandro Lucarella said: I'm not say is right or wrong for people to have this reflex of thinking about multipliers, I'm just saying if you care about transmitting the message as clear as you can, is

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Walter Bright
On 8/2/2013 4:18 AM, Richard Webb wrote: It still appears that the DMC malloc is a big reason for the difference between DMC and MSVC builds when compiling the algorithm unit tests. (a very quick test suggests that changing the global new in rmem.c to call HeapAlloc instead of malloc gives a

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Walter Bright
On 8/2/2013 1:45 PM, user wrote: I am OK with the existing definition of speed, but would like to see the definition mentioned somewhere at the top. speed = lines_compiled/sec. Even though its obvious to some people, it not to me! Sigh. It's not even lines per second, it's dimensionless when

Re: Increasing D Compiler Speed by Over 75%

2013-08-02 Thread Dmitry Olshansky
02-Aug-2013 20:40, Walter Bright пишет: On 8/2/2013 8:18 AM, Daniel Murphy wrote: On a related note, I just tried replacing the two ::malloc calls in rmem's operator new with VirtualAlloc and I get a reduction from 13 seconds to 9 seconds (compiling dmd std\range -unittest -main) with a release

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Dmitry Olshansky
02-Aug-2013 20:47, Walter Bright пишет: On 8/2/2013 6:16 AM, Dmitry Olshansky wrote: I failed to see much of any improvement on Win32 though, allocations are dominating the picture. And sharing the joy of having a nice sampling profiler, here is what AMD CodeAnalyst have to say (top X

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-08-02 Thread Walter Bright
On 8/2/2013 3:53 PM, Dmitry Olshansky wrote: Thanks, that must be it! And popping that function above another one gets Obj::far16thunk to be blamed :) Need to watch out for this sort of problem next time. Could it be due to how it works with old CV debug info format? Try compiling with -g.

Re: dmc 8.57 now available for download

2013-08-02 Thread Chang Long
On Friday, 2 August 2013 at 01:25:08 UTC, Walter Bright wrote: On 8/1/2013 6:22 PM, bearophile wrote: Walter Bright: Fixed. Do you mean that if I download the dmc zip again it will work? Yes, unless I screwed it up again. the package dm857c.zip show dmc file create at 2004, and when I