Re: Article: Increasing the D Compiler Speed by Over 75%
On Mon, 29 Jul 2013 20:05:08 +0100, John Colvin john.loughran.col...@gmail.com wrote: On Monday, 29 July 2013 at 18:34:16 UTC, Walter Bright wrote: On 7/29/2013 5:28 AM, John Colvin wrote: Seriously... Walter wouldn't have got his mechanical engineering degree if he didn't know how to calculate a speed properly. It's a grade school concept :-) A college freshman physics problem would be calculating the delta V of a rocket fired in space given the fuel weight, rocket empty weight, thrust, etc. Physics graduate / soon to be PhD student here :) It's sad how few rockets were involved in my degree... Time to fix that! https://kerbalspaceprogram.com/ R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Re: Increasing D Compiler Speed by Over 75%
DMC is ugly compiler. It will be much nicer if you'll use mingw for that purpose on Windows. GCC usually generates more faster code that VC does. http://sourceforge.net/projects/mingwbuilds/
Re: Article: Increasing the D Compiler Speed by Over 75%
On Tuesday, 30 July 2013 at 10:08:22 UTC, Leandro Lucarella wrote: JS, el 29 de July a las 22:32 me escribiste: On Monday, 29 July 2013 at 19:38:51 UTC, Walter Bright wrote: On 7/29/2013 12:08 PM, JS wrote: Trying to use distance and speed as a measure of performance of a program is just ridiculous. If you google program execution speed you'll find it's a commonly used term. Lines per second is a common measure of compiler execution speed - google compiler lines per second and see. (again, if we started with 12 second and went to 21 seconds, it would be a near 75% increase. But a 75% increase is not a 75% decrease) Speed is the reciprocal of time, meaning a decrease in time is an increase in speed. You are right, sorry. There is no difference. I think the issue is interpretation. When I read X% increase in speed I think X% faster [in time]. 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 message you wanted to give in that blog is not extremely clear :) That was my whole point. If you used some easier measure to understand (like using time instead of speed) you could have avoided all this confusion :) It depends on the audience, but to write an article that is informal then use a very formal definition of speed is just begging for problems. It's hard for me to really imagine that lines is a measurement of distance and speed is lines per second... but even if I allow this I don't understand why it is a better metric than just time alone(even though it is equivalent mathematically it is a convoluted approach). If a compiler can compile n lines per second, is that really all that useful as a direct measurement? Are you saying I have to go count the lines of code in my program? Do I count empty lines? commented lines? etc... Why don't you just give me the most direct answer? Time is really all that matters, everything else is just obfuscation.
Article about Applied D
Dear Dees, Here is the article. I've set up a (temporary?) blog for it. The article deals with the usability of D and how it helped to solve certain problems. It's not about benchmarking, concurrency, unit tests and the like. Just about how practical it is. Here it is, warts and all: http://wendlerchristoph.wordpress.com/2013/07/30/probably-d/ Comments are welcome. If you think it's interesting enough, we can post it to gamedev. Although I think it is not very techy.
Re: Article about Applied D
It's a good why should I care about D article. I frequent Hacker News, and one thing that seems to get people really hyped about a language is Getting Things Done, as well as all the functional programming hype. One thing that caught my eye: I also recommend the book The D Programming Language by Alexei Alexandrescu. The author not only describes the language but also explains the reasoning behind the language design. Apart from learning about D, you learn a lot about programming in general, and believe it or not, it’s also fun to read. I have to agree, Andrei has a great writing style. I've read TDPL through 3 times now, and I can't say that there's any section that I find dry or boring.
Re: Article about Applied D
On Tuesday, 30 July 2013 at 13:53:24 UTC, Chris wrote: Dear Dees, Here is the article. I've set up a (temporary?) blog for it. The article deals with the usability of D and how it helped to solve certain problems. It's not about benchmarking, concurrency, unit tests and the like. Just about how practical it is. Here it is, warts and all: http://wendlerchristoph.wordpress.com/2013/07/30/probably-d/ Comments are welcome. If you think it's interesting enough, we can post it to gamedev. Although I think it is not very techy. Good one, worth sharing. As a D user I'd probably love to see more technical details but for a wider public it is a solid match. Though you will almost certainly be asked about how you have handled phone platform in the end, may be worth mentioning it explicitly. As D is not there yet guess web fallback is used?
Re: Article: Increasing the D Compiler Speed by Over 75%
On 7/30/13 4:10 AM, JS wrote: It depends on the audience, but to write an article that is informal then use a very formal definition of speed is just begging for problems. It's hard for me to really imagine that lines is a measurement of distance and speed is lines per second... but even if I allow this I don't understand why it is a better metric than just time alone(even though it is equivalent mathematically it is a convoluted approach). If a compiler can compile n lines per second, is that really all that useful as a direct measurement? Are you saying I have to go count the lines of code in my program? Do I count empty lines? commented lines? etc... Why don't you just give me the most direct answer? Time is really all that matters, everything else is just obfuscation. This is wrong on many levels. Andrei
Re: Article: Increasing the D Compiler Speed by Over 75%
On 7/30/13 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 message you wanted to give in that blog is not extremely clear :) That was my whole point. If you used some easier measure to understand (like using time instead of speed) you could have avoided all this confusion :) I tend to disagree on this, and I think the title of the article is good as is (I've reviewed it). I'd say if a programmer doesn't have a clear notion of what speed is and how comparisons go etc., they better learn it pronto. There's nothing complicated here, and if something is not obvious to some readers this is even better because the article serves as an educational tool in more ways than one. Speed involves time at the denominator, i.e. seconds come to the power of -1. I don't think it's fair to negotiate whether this is expected. Every engineer must know this. Percentage changes go as follows. If you increase something by 100% it means you doubled it. If you decrease something by 50% it means you halved it. Everything else can be easily derived from these. Again, I consider this non-negotiable background knowledge. Andrei
Re: Increasing D Compiler Speed by Over 75%
On Tuesday, 30 July 2013 at 09:04:10 UTC, Temtaime wrote: DMC is ugly compiler. It will be much nicer if you'll use mingw for that purpose on Windows. GCC usually generates more faster code that VC does. http://sourceforge.net/projects/mingwbuilds/ I'm willing to bet Walter would accept pull requests to add support for mingw like he did with VC. Be sure to document the build process when you make the changes. Sidenote: Insulting Walter's work isn't a great way to get him to do your a favor.
Re: Article: Increasing the D Compiler Speed by Over 75%
On 7/30/2013 11:02 AM, Dmitry Olshansky wrote: 26-Jul-2013 23:17, Walter Bright пишет: How about a pull request so we can try it out? Preliminary pull is here: https://github.com/D-Programming-Language/dmd/pull/2436 So far it looses a bit. :-) That's often been my experience. I'm still playing with it, looking at load factor, distribution of sizes, profiling. So far observations are that SpookyHash is slower then the one that was there thus stealing a few percents of speed. That is then hardly regained by a faster lookup of a slot: almost all of large tables were 31 in size and you have special case for that anyway. What bothers me is that while I've been hacking at this I couldn't shake off the feeling that AA code assumes NO FULL HASH COLLISIONS at all? I don't know what you mean, as it has a collision resolution system. See embedded code below. Isn't that betting on luck (and a crude hash) a little too much (esp in 32 bit mode)? That is e.g. in code pasted from aav.c Key is only a hash and there is no way whatsoever to discern a full hash collision. Value _aaGetRvalue(AA* aa, Key key) { //printf(_aaGetRvalue(key = %p)\n, key); if (aa) { size_t i; size_t len = aa-b_length; if (len == 4) i = (size_t)key 3; else if (len == 31) i = (size_t)key % 31; else i = (size_t)key % len; aaA* e = aa-b[i]; while (e) { if (key == e-key) return e-value; e = e-next; ^^^ collision resolution code ^^^ * } } return NULL;// not found }
Re: Article: Increasing the D Compiler Speed by Over 75%
On 7/30/13 11:13 AM, Walter Bright wrote: 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 message you wanted to give in that blog is not extremely clear :) It never occurred to me that anyone would have any difficulty understanding the notion of speed. After all, we deal with it every day when driving. And when applying the engine brake. Today, I reduced my speed by engine braking by 50%! Andrei
Re: Article about Applied D
On Tuesday, 30 July 2013 at 19:04:12 UTC, Andrei Alexandrescu wrote: On 7/30/13 8:47 AM, Meta wrote: It's a good why should I care about D article. I frequent Hacker News, and one thing that seems to get people really hyped about a language is Getting Things Done, as well as all the functional programming hype. One thing that caught my eye: I also recommend the book The D Programming Language by Alexei Alexandrescu. The author not only describes the language but also explains the reasoning behind the language design. Apart from learning about D, you learn a lot about programming in general, and believe it or not, it’s also fun to read. They should've called me Alexei Andreescu! Andrei Ha ha ha! I've altered your ego.
Re: Article about Applied D
On Tuesday, 30 July 2013 at 14:21:06 UTC, bearophile wrote: Chris: http://wendlerchristoph.wordpress.com/2013/07/30/probably-d/ [Python] copyright issues (easily decompilable byte code) Is that true? For small D examples I suggest the Rosettacode site (when its site isn't down). Bye, bearophile It was an issue with the legal department. A compiled D binary might be a harder nut to crack, especially for the casual cracker who wants to give it a go when s/he sees a .pyc file. Same goes for Java. But if you know something that might interest me, please tell me.
Re: Article about Applied D
On Tuesday, 30 July 2013 at 15:47:29 UTC, Meta wrote: It's a good why should I care about D article. I frequent Hacker News, and one thing that seems to get people really hyped about a language is Getting Things Done, as well as all the functional programming hype. That was the reason why I wrote this short article. To share my own experience and to show people that it is a real world language that helps to solve real problems. Benchmarking and feature comparison alone will never convince people, because the first question is usually along the lines of What can the language do for me? Is it easy? I don't want to spend much time learning a new language! Then they ask if there are any useful libraries (C interfacing) and if it's portable. Nobody wants to write the code more than once. Part of Java's and later Android's success was exactly this.
Re: Article about Applied D
On Tuesday, 30 July 2013 at 17:23:34 UTC, Dicebot wrote: Good one, worth sharing. As a D user I'd probably love to see more technical details but for a wider public it is a solid match. The technical details are rather boring. Good old OOP and I made use of D's structs and some other nice features. Nothing a D user, in fact any programmer, would not be familiar with. Though you will almost certainly be asked about how you have handled phone platform in the end, may be worth mentioning it explicitly. As D is not there yet guess web fallback is used? This is a good point! I haven't tackled mobile phones yet, and I doubt that it will be easy. I didn't include it in the article because I have no experience with D on mobile yet. However, I hope that D will get there. In the meantime, there is the web, as you said.
Re: Article: Increasing the D Compiler Speed by Over 75%
On Tue, Jul 30, 2013 at 12:05 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/30/13 11:13 AM, Walter Bright wrote: 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 message you wanted to give in that blog is not extremely clear :) It never occurred to me that anyone would have any difficulty understanding the notion of speed. After all, we deal with it every day when driving. Yeh sure. Like I made the trip to grandmother's house in 0.25 trips/hour!. That's 25% faster than last week when I only drove at 0.2 trips/hour. I say that all the time. ;-) --bb
Re: Increasing D Compiler Speed by Over 75%
On 7/30/2013 11:16 AM, Brad Anderson wrote: Sidenote: Insulting Walter's work isn't a great way to get him to do your a favor. I'm sad that I never got the opportunity to be insulted by Jobs.
Re: GoingNative 2013
On 7/30/2013 1:14 PM, Adam Wilson wrote: Since I've never been before, I would like to know if there is a place that I can setup a laptop in the lecture hall. I *really* want to go to this, but I have product launch two weeks prior at VSLive (also at MSFT) and it may need emergency support. Most people there seem to have laptops and use them, so I doubt this would be an issue.
Re: GoingNative 2013
On 7/30/13 1:14 PM, Adam Wilson wrote: On Mon, 29 Jul 2013 15:12:39 -0700, Walter Bright newshou...@digitalmars.com wrote: http://channel9.msdn.com/Events/GoingNative/2013 The last one was a lot of fun, so I signed up for this one, too. Note that Andrei is a speaker! Recommended. See y'all there! (P.S. It's entirely possible that I may get my mythical '72 Dodge running in time for this, and I can drive it to the conference. It blarts out enough CO2 to melt at least 3 Priuses.) Since I've never been before, I would like to know if there is a place that I can setup a laptop in the lecture hall. I *really* want to go to this, but I have product launch two weeks prior at VSLive (also at MSFT) and it may need emergency support. Yah, you can. Andrei