digitalmars.D - Optimizations of DMD
- Orgoton (1/1) Mar 02 2007 Does DMD perform processor specific optimizations? Does it make use of M...
- janderson (6/7) Mar 02 2007 Not at the moment (as far as I know), although there have been some long...
- Howard Berkey (2/12) Mar 02 2007 I was thinking that some kind of standardized vector intrinsic interface...
- Daniel Keep (14/29) Mar 02 2007 Some time ago, I wrote a simple library that extended arrays of basic
- Howard Berkey (10/40) Mar 03 2007 My fear is that the SIMD operations themselves might not be orthogonal e...
- Benji Smith (8/12) Mar 03 2007 Please do publish it. I'd like to teach myself some assembly
- Daniel Keep (25/41) Mar 06 2007 Tracked it down, zipped it up, and attached it. However, keep in mind
- Daniel Keep (8/8) Mar 06 2007 Hmm... forgot to attach it. I tried uploading to my web-space, but it
- Benji Smith (3/5) Mar 06 2007 Thanks!!!
- Stewart Gordon (5/7) Mar 04 2007 At first I thought that was a new means of munging email addresses. Now...
- =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= (3/12) Mar 04 2007 A true hacker probably automagically decodes it. :) The program on the
- Daniel Keep (9/20) Mar 04 2007 I did write a Python script that would decode it, but that was ages ago
- Dan (2/2) Mar 05 2007 Sweet. That's actually rather terse, and interesting...
- Dan (4/4) Mar 05 2007 Dan Wrote:
- Stewart Gordon (4/4) Mar 06 2007 Two other interesting observations.
Does DMD perform processor specific optimizations? Does it make use of MMX, SSE and other such extensions? I am creating high performance applications and these optimizations would really come in handy.
Mar 02 2007
Orgoton wrote:Does DMD perform processor specific optimizations? Does it make use of MMX, SSE and other such extensions? I am creating high performance applications and these optimizations would really come in handy.Not at the moment (as far as I know), although there have been some long discussions about it. Of course you can always do it in ASM. Performance wise, you should be able to get near or better then C++. PS - I'm looking forward to seeing these in D as well. -Joel
Mar 02 2007
janderson Wrote:Orgoton wrote:I was thinking that some kind of standardized vector intrinsic interface would be really cool. Think std.intrinsic or Tango's core.intrinsic, extended to vectorized types, with one interface for various underlying implementations. I don't know enough about the functional overlap of AltiVec with x86 SIMD to know if it is feasible or not though, especially if things like alignment contraints are different for each set.Does DMD perform processor specific optimizations? Does it make use of MMX, SSE and other such extensions? I am creating high performance applications and these optimizations would really come in handy.Not at the moment (as far as I know), although there have been some long discussions about it. Of course you can always do it in ASM. Performance wise, you should be able to get near or better then C++. PS - I'm looking forward to seeing these in D as well. -Joel
Mar 02 2007
Howard Berkey wrote:janderson Wrote:Some time ago, I wrote a simple library that extended arrays of basic types with parallel operations (like add, mult, madd, etc.) that were coded in MMX. Never bothered to publish it since I wasn't sure if it was actually useful or not... That said, it's certainly possible to add some of this stuff in library code. It's definitely worth doing it if only because you need to teach yourself some assembler to do it. -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/Orgoton wrote:I was thinking that some kind of standardized vector intrinsic interface would be really cool. Think std.intrinsic or Tango's core.intrinsic, extended to vectorized types, with one interface for various underlying implementations. I don't know enough about the functional overlap of AltiVec with x86 SIMD to know if it is feasible or not though, especially if things like alignment contraints are different for each set.Does DMD perform processor specific optimizations? Does it make use of MMX, SSE and other such extensions? I am creating high performance applications and these optimizations would really come in handy.Not at the moment (as far as I know), although there have been some long discussions about it. Of course you can always do it in ASM. Performance wise, you should be able to get near or better then C++. PS - I'm looking forward to seeing these in D as well. -Joel
Mar 02 2007
Daniel Keep Wrote:Howard Berkey wrote:My fear is that the SIMD operations themselves might not be orthogonal enough across various processors to be able to abstract anything but a small subset in a standardized way in a platform library like phobos or Tango. I have not really looked in to them enough to know; this is just something that I am kind of tangentially interested in and I thought it would be cool if possible. The other option of course is to have the compiler generate and use them internally when possible. And of course the two options are not mutually exclusive either. I think that D has a really good start on this now; having things like std.intrinsic in the standard librar(ies) is actually very nice. Having alignment as a specifier baked into the language itself is also great; no more ugly compiler specific stuff like #ifdef __GNUC__ __attribute__((aligned(16))); #endif or whatever. But I digress from the original question :) Howardjanderson Wrote:Some time ago, I wrote a simple library that extended arrays of basic types with parallel operations (like add, mult, madd, etc.) that were coded in MMX. Never bothered to publish it since I wasn't sure if it was actually useful or not... That said, it's certainly possible to add some of this stuff in library code. It's definitely worth doing it if only because you need to teach yourself some assembler to do it. -- DanielOrgoton wrote:I was thinking that some kind of standardized vector intrinsic interface would be really cool. Think std.intrinsic or Tango's core.intrinsic, extended to vectorized types, with one interface for various underlying implementations. I don't know enough about the functional overlap of AltiVec with x86 SIMD to know if it is feasible or not though, especially if things like alignment contraints are different for each set.Does DMD perform processor specific optimizations? Does it make use of MMX, SSE and other such extensions? I am creating high performance applications and these optimizations would really come in handy.Not at the moment (as far as I know), although there have been some long discussions about it. Of course you can always do it in ASM. Performance wise, you should be able to get near or better then C++. PS - I'm looking forward to seeing these in D as well. -Joel
Mar 03 2007
Daniel Keep wrote:Some time ago, I wrote a simple library that extended arrays of basic types with parallel operations (like add, mult, madd, etc.) that were coded in MMX. Never bothered to publish it since I wasn't sure if it was actually useful or not...Please do publish it. I'd like to teach myself some assembly programming, and it'd be nice to see someone else's code for inlining array operations with MMX instructions. If you don't post it at dsource, at least send me an email with the code attached. Thanks!! --benji
Mar 03 2007
Benji Smith wrote:Daniel Keep wrote:Tracked it down, zipped it up, and attached it. However, keep in mind that this code is almost a year old, not extensively tested, and *very likely* won't compile. If you actually want to get it working, I suggest looking for implicit conversions from arrays to pointers and public/private import problems (default changed from public to private). I actually liked how this library was put together, even if it *was* fairly useless. At compile time, it selected one of a set of backends depending on version flags and what platform you were on. If your platform didn't have a fast parallel implementation available, it simply fell back on the software implementation. Code once, run anywhere, run really fast where possible :P Anyway, the assembler code should still work. I don't think it's all been very thoroughly tested, and there could be other errors or problems. But it might make a nice starting point. Incidentally, all of the code is public domain, so if anyone wants to take this and run with it, feel free. If anyone on the Tango project is interested, I'd still like to see something like this in Tango (or Phobos!) at some stage (better designed, I would hope). -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/Some time ago, I wrote a simple library that extended arrays of basic types with parallel operations (like add, mult, madd, etc.) that were coded in MMX. Never bothered to publish it since I wasn't sure if it was actually useful or not...Please do publish it. I'd like to teach myself some assembly programming, and it'd be nice to see someone else's code for inlining array operations with MMX instructions. If you don't post it at dsource, at least send me an email with the code attached. Thanks!! --benji
Mar 06 2007
Hmm... forgot to attach it. I tried uploading to my web-space, but it looks like the ISP's decided to not publish user directories anymore :'( -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
Mar 06 2007
Daniel Keep wrote:Hmm... forgot to attach it. I tried uploading to my web-space, but it looks like the ISP's decided to not publish user directories anymore :'(Thanks!!! --benji
Mar 06 2007
Daniel Keep Wrote: <snip>v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/At first I thought that was a new means of munging email addresses. Now I see it's a new version of geek code. But is there any tool for decoding the version you've used, or is one supposed to do it manually? Stewart.
Mar 04 2007
Stewart Gordon kirjoitti:Daniel Keep Wrote: <snip>A true hacker probably automagically decodes it. :) The program on the website happily decrypts it after replacing v2 with v4.v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/At first I thought that was a new means of munging email addresses. Now I see it's a new version of geek code. But is there any tool for decoding the version you've used, or is one supposed to do it manually?
Mar 04 2007
Stewart Gordon wrote:Daniel Keep Wrote: <snip>I did write a Python script that would decode it, but that was ages ago and stuffed if I can find the damn thing... -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/At first I thought that was a new means of munging email addresses. Now I see it's a new version of geek code. But is there any tool for decoding the version you've used, or is one supposed to do it manually? Stewart.
Mar 04 2007
Sweet. That's actually rather terse, and interesting... sw7CSDhw5ln7pr7OSAPFck2ma5u6LSBw4Xl6GLSiOSciTE/e4t3b6AHen4g5VGPa2Xs6MRr8p-2/-5 hackerkey.com
Mar 05 2007
Dan Wrote: They have a generator, good. The one I just wrote up had bugs and missing features. : p Here we are: v4sw7+8CHSUhw5ln7pr7AFOPS$ck2ma5+8u6+7LOSw4Xm3l6GKLSiOSciTE/e4t3b6ADHen4a Xs6/8MRr8p-2/-5g5GV hackerkey.com
Mar 05 2007
Two other interesting observations. 1. "Keep the Guide up to date. I can only promise I will either keep the guide up to date or turn it over to someone who will. Time will tell if I can keep that promise." It took me a while to notice that it was talking about keeping the Guide up to date, not keeping Hacker Key itself up to date (which it already isn't). 2. It isn't clear how they're making commercial use of the Hacker Key or even planning to. Stewart.
Mar 06 2007