Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread Brad Roberts
On Wed, 29 Aug 2012, Timon Gehr wrote: > On 08/29/2012 01:26 AM, David wrote: > > > Use this to create a minimal test case with minimal user interaction: > > > https://github.com/CyberShadow/DustMite > > > > Doesn't help if dmd doesn't crash, or? > > > > It doesn't help a lot if compilation suc

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread Timon Gehr
On 08/29/2012 01:26 AM, David wrote: Use this to create a minimal test case with minimal user interaction: https://github.com/CyberShadow/DustMite Doesn't help if dmd doesn't crash, or? It doesn't help a lot if compilation succeeds, but you stated that you generally tend to ignore dmd bugs.

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
Use this to create a minimal test case with minimal user interaction: https://github.com/CyberShadow/DustMite Doesn't help if dmd doesn't crash, or?

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread Timon Gehr
On 08/28/2012 06:35 PM, David wrote: Am 28.08.2012 17:41, schrieb bearophile: David: The arrays are 100% identical (I dumped a Vertex()-array and a raw float-array, they were 100% identical). I hope some people are realizing how much time is being wasted in this thread. Taking a look at the

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
But I'd like you to not ignore all the bugs you find, and instead minimize some of them and submit them to Bugzilla. Despite thousands of open bugs and about a hundred of open patches, many bugs do get fixed at every release. If you submit bugs, D/DMD will improve, in your future you will find les

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread bearophile
David: I generally tend to ignore dmd bugs and just workaround them, I don't have the time to track down every stuipid bug from a ~8k codebase. I understand you don't care much anymore for the discussed problem, and I know that localizing D/DMD bugs requires some time and work. But I'd li

Re: abnormal program termination

2012-08-28 Thread Ellery Newcomer
On 08/28/2012 09:55 AM, Regan Heath wrote: > I searched the DMD sources, just in case the message "abnormal > program termination" was DMD specific, and I found nothing. Then I > searched all files and the string appears in the dmd.exe binary, > making me suspect the compiler used to produce dmd.

Re: CTFE question

2012-08-28 Thread Philippe Sigaud
On Tue, Aug 28, 2012 at 2:07 PM, Chris Cain wrote: > On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote: >> >> Ahhh I understand... >> >> As a follow up, is it then possible to 'track' filling a >> large enum / immutable on compile time by outputting a msg >> every for ? >> >> I'm gene

Re: abnormal program termination

2012-08-28 Thread Regan Heath
On Tue, 28 Aug 2012 15:59:34 +0100, Ellery Newcomer wrote: On 08/28/2012 06:37 AM, Regan Heath wrote: On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer wrote: I am running into an ICE on windows - Assertion Failure on such-and-such line in mtype.c - and I am trying to get a test command

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
Am 28.08.2012 17:41, schrieb bearophile: David: The arrays are 100% identical (I dumped a Vertex()-array and a raw float-array, they were 100% identical). I hope some people are realizing how much time is being wasted in this thread. Taking a look at the asm is my suggestion still. If someone

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread bearophile
David: The arrays are 100% identical (I dumped a Vertex()-array and a raw float-array, they were 100% identical). I hope some people are realizing how much time is being wasted in this thread. Taking a look at the asm is my suggestion still. If someone is rusty in asm, it's time to brush awa

Re: CTFE question

2012-08-28 Thread bearophile
Danny Arends: Seems a bit strange that a discussion about yes/no newline is keeping this from getting into DMD. The ending newline is bad, because it unnecessarily kills some use cases for this feature. But I think the newline is not what is keeping it out of DMD. It's just there are about a

Re: abnormal program termination

2012-08-28 Thread Ellery Newcomer
On 08/28/2012 06:37 AM, Regan Heath wrote: On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer wrote: I am running into an ICE on windows - Assertion Failure on such-and-such line in mtype.c - and I am trying to get a test command for to reduce it with the redoubtable dustmite. Normally, 'abn

Re: abnormal program termination

2012-08-28 Thread Regan Heath
On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer wrote: I am running into an ICE on windows - Assertion Failure on such-and-such line in mtype.c - and I am trying to get a test command for to reduce it with the redoubtable dustmite. Normally, 'abnormal program termination' is printed

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
Am 28.08.2012 01:53, schrieb Sean Kelly: On Aug 24, 2012, at 1:16 PM, David wrote: That's not the problem. The problem has nothing to do with the tessellation, since the *rendering* is also 1000% slower (when all data is already processed). Is the alignment different between one and the oth

Re: CTFE question

2012-08-28 Thread Danny Arends
On Tuesday, 28 August 2012 at 12:07:07 UTC, Chris Cain wrote: On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote: I'm pretty sure there isn't. However, if you're just trying to develop/test your algorithm, you could write a program that runs it as a normal function (and just use wri

Re: CTFE question

2012-08-28 Thread Chris Cain
On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote: Ahhh I understand... As a follow up, is it then possible to 'track' filling a large enum / immutable on compile time by outputting a msg every for ? I'm generating rotation matrices for yaw, pitch and roll at compile time which can

Re: static struct definition

2012-08-28 Thread monarch_dodra
On Tuesday, 28 August 2012 at 11:06:51 UTC, Simen Kjaeraas wrote: On Tue, 28 Aug 2012 12:10:47 +0200, monarch_dodra wrote: From TDPL: 7.18: "Unlike classes nested within classes, nested structs and nested classes within structs don’t contain any hidden member outer—there is no special code

Re: CTFE question

2012-08-28 Thread Danny Arends
Ahhh I understand... As a follow up, is it then possible to 'track' filling a large enum / immutable on compile time by outputting a msg every for ? I'm generating rotation matrices for yaw, pitch and roll at compile time which can take a long time depending on how fine grained I create them. G

Re: CTFE question

2012-08-28 Thread Chris Cain
On Tuesday, 28 August 2012 at 11:13:40 UTC, Danny Arends wrote: Is this a bug or am I doing something wrong ?? Danny Arends http://www.dannyarends.nl You're doing something wrong, but I can see why the error message would confuse you. Your problem is using those pragma(msg, ...) lines... Th

CTFE question

2012-08-28 Thread Danny Arends
I have the following code: import std.stdio; import std.metastrings; pure int[] testCTFE(){ int[] r; pragma(msg, "Testing CTFE"); foreach(i; 0 .. 360){ r ~= i; pragma(msg, Format!("Loop: %d",i)); } pragma(msg, "Done CTFE test"); return r;

Re: static struct definition

2012-08-28 Thread Simen Kjaeraas
On Tue, 28 Aug 2012 12:10:47 +0200, monarch_dodra wrote: From TDPL: 7.18: "Unlike classes nested within classes, nested structs and nested classes within structs don’t contain any hidden member outer—there is no special code generated. The main design goal of nesting such types is to en

Re: Comparing pointers with "is"

2012-08-28 Thread monarch_dodra
On Monday, 27 August 2012 at 16:33:46 UTC, bearophile wrote: monarch_dodra: Either that, or is it considered "best practice" to use "is" to compare pointers, For two pointers using "==" or "is" is the same. And I don't remember "best practices" about this. If your pointers later risk becomi

Re: static struct definition

2012-08-28 Thread monarch_dodra
On Monday, 27 August 2012 at 18:53:23 UTC, bearophile wrote: Andrej Mitrovic: Isn't this limited to just classes? See the last section of this page: http://dlang.org/struct.html Nested Structs: A nested struct is a struct that is declared inside the scope of a function or a templated struct