www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: BLADE 0.2Alpha: Vector operations with mixins, expression templates,

reply Dan <murpsoft hotmail.com> writes:
Don Clugston Wrote:
 this case, I thought it would be relevant to AST macro development.
 Also I posted this to get an idea if there was much interest in this 
 sort of thing -- I don't have a great deal of free time, so I want to 
 make good use of it. I only got the code working a few days ago.
 The speed of the code will likely be affected by how well DMD optimises 
 the tuple copying. I even haven't looked at what code it's actually 
 generating.
 

In essence, it's a *demonstration* that with all of D's features combined, one can write a fwicked-optimized compiler at compile time in D. He's also working towards it being Agner Fog's ideal of optimal; and is taking the right steps to do it. Agner Fog is quite respected for his work in the x86 family of assembly; and previously I haven't seen any program that can *generate* code sufficiently well to approach his optimal assembly source.
Apr 06 2007
parent Don Clugston <dac nospam.com.au> writes:
Dan wrote:
 Don Clugston Wrote:
 this case, I thought it would be relevant to AST macro development.
 Also I posted this to get an idea if there was much interest in this 
 sort of thing -- I don't have a great deal of free time, so I want to 
 make good use of it. I only got the code working a few days ago.
 The speed of the code will likely be affected by how well DMD optimises 
 the tuple copying. I even haven't looked at what code it's actually 
 generating.

In essence, it's a *demonstration* that with all of D's features combined, one can write a fwicked-optimized compiler at compile time in D.

Exactly.
 He's also working towards it being Agner Fog's ideal of optimal; and is taking
the right steps to do it.  Agner Fog is quite respected for his work in the x86
family of assembly; and previously I haven't seen any program that can
*generate* code sufficiently well to approach his optimal assembly source.

It might be because no-one has really tried. Agner told me that he has *never* been emailed by a compiler writer, even though he's tried to get their attention; I find that astonishing. Someone recently posted a link to an article by Michael Abrash about his software DirectX 3D renderer. There are some similarities to this: he's developed a basic, efficient code structure, and his renderer takes little fragments of code and inserts them into it. Working out what the code structure should be (which is what compilers generally try to do) is a fantastically difficult problem, but splicing fragments together is pretty easy. OTOH it must be pretty hard to identify patterns like this after the initial code generation step.
Apr 07 2007