Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Ilya Yaroshenko
On Sunday, 18 August 2013 at 05:26:00 UTC, Manu wrote: movups is not good. It'll be a lot faster (and portable) if you use movaps. Process looks something like: * do the first few from a[0] until a's alignment interval as scalar * load the left of b's aligned pair * loop for each aligne

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Manu
movups is not good. It'll be a lot faster (and portable) if you use movaps. Process looks something like: * do the first few from a[0] until a's alignment interval as scalar * load the left of b's aligned pair * loop for each aligned vector in a - load a[n..n+4] aligned - load the ri

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Ilya Yaroshenko
On Sunday, 18 August 2013 at 05:07:12 UTC, Manu wrote: On 18 August 2013 14:39, Ilya Yaroshenko wrote: On Sunday, 18 August 2013 at 01:53:53 UTC, Manu wrote: It doesn't look like you account for alignment. This is basically not-portable (I doubt unaligned loads in this context are faster

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Manu
On 18 August 2013 14:39, Ilya Yaroshenko wrote: > On Sunday, 18 August 2013 at 01:53:53 UTC, Manu wrote: > >> It doesn't look like you account for alignment. >> This is basically not-portable (I doubt unaligned loads in this context >> are >> faster than performing scalar operations), and possibl

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Ilya Yaroshenko
On Saturday, 17 August 2013 at 19:38:52 UTC, John Colvin wrote: On Saturday, 17 August 2013 at 19:24:52 UTC, Ilya Yaroshenko wrote: BTW: -march=native automatically implies -mtune=native Thanks, I`ll remove mtune) It would be really interesting if you could try writing the same code in c, b

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Ilya Yaroshenko
On Sunday, 18 August 2013 at 01:53:53 UTC, Manu wrote: It doesn't look like you account for alignment. This is basically not-portable (I doubt unaligned loads in this context are faster than performing scalar operations), and possibly inefficient on x86 too. dotProduct uses unaligned loads (

Re: Rust vs Dlang

2013-08-17 Thread Tyler Jameson Little
On Saturday, 16 March 2013 at 14:42:58 UTC, Suliman wrote: Hi folks! I had wrote small article about Rust vs D. I hope that you will like it! http://versusit.org/rust-vs-d I don't know if you still follow this, but there's a typo here: Now, let’s see, how the code, outputting the word "Hello

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Manu
It doesn't look like you account for alignment. This is basically not-portable (I doubt unaligned loads in this context are faster than performing scalar operations), and possibly inefficient on x86 too. To make it account for potentially random alignment will be awkward, but it might be possible t

Re: D reaches 1000 questions on stackoverflow

2013-08-17 Thread John Colvin
On Saturday, 17 August 2013 at 20:12:49 UTC, Paul Jurczak wrote: On Saturday, 17 August 2013 at 11:00:20 UTC, John Colvin wrote: On Saturday, 17 August 2013 at 09:21:27 UTC, Paul Jurczak wrote: On Saturday, 17 August 2013 at 01:05:18 UTC, Tyler Jameson Little wrote: [..] It's true though that

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread bearophile
Ilya Yaroshenko: http://spiceandmath.blogspot.ru/2013/08/simd-implementation-of-dot-product_17.html From the blog post: Compile fast_math code from other program separately and then link it. This is easy solution. However this is a step back to C.< To introduce a @fast_math attribute. This i

Re: D reaches 1000 questions on stackoverflow

2013-08-17 Thread Paul Jurczak
On Saturday, 17 August 2013 at 11:00:20 UTC, John Colvin wrote: On Saturday, 17 August 2013 at 09:21:27 UTC, Paul Jurczak wrote: On Saturday, 17 August 2013 at 01:05:18 UTC, Tyler Jameson Little wrote: [..] It's true though that there are much better answers (and questions) here than on SO, an

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread John Colvin
On Saturday, 17 August 2013 at 19:24:52 UTC, Ilya Yaroshenko wrote: BTW: -march=native automatically implies -mtune=native Thanks, I`ll remove mtune) It would be really interesting if you could try writing the same code in c, both a scalar version and a version using gcc's vector instrinsic

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Ilya Yaroshenko
BTW: -march=native automatically implies -mtune=native Thanks, I`ll remove mtune)

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread John Colvin
On Saturday, 17 August 2013 at 18:50:15 UTC, Ilya Yaroshenko wrote: http://spiceandmath.blogspot.ru/2013/08/simd-implementation-of-dot-product_17.html Ilya Nice, that's a good speedup. BTW: -march=native automatically implies -mtune=native

SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread Ilya Yaroshenko
http://spiceandmath.blogspot.ru/2013/08/simd-implementation-of-dot-product_17.html Ilya

Re: D at University of Minnesota

2013-08-17 Thread deadalnix
On Saturday, 17 August 2013 at 15:22:26 UTC, Carl Sturtivant wrote: Hello Andrei, Ali, Well, CS2 in D is over, and grades are in. Being a summer course it was conducted at twice the speed as in a regular semester. [...] That is truly awesome news !

Re: D at University of Minnesota

2013-08-17 Thread Carl Sturtivant
What happened is that I unclear what the state of play is; I am not asserting the wrongness of TDPL. Still, I am reassured by your responses. Hi Carl -- TDPL is for the most part in good shape. There are a few inaccuracies, but I'd say most concern corner cases that are unlike to deter the le

What's the $(D) macro? WAS: Re: DDT 0.7.0 released

2013-08-17 Thread Bruno Medeiros
On 16/08/2013 20:14, Bruno Medeiros wrote: Found a bug in the meanwhile, the DDoc viewer is not rendering $(D) DDoc macros. Speaking of which, where does that macro come from? Seems similar to the D_CODE macro, but it's not documented as one of the default DDoc macros, nor could I find it as

Re: DDT 0.7.0 released

2013-08-17 Thread Bruno Medeiros
On 16/08/2013 20:22, Andrei Alexandrescu wrote: On 8/16/13 12:14 PM, Bruno Medeiros wrote: I've updated the Features wiki with new screenshots, and revised the text to be more clear: http://code.google.com/p/ddt/wiki/Features (like removing the "A JDT-like project model" references which actuall

Re: DDT 0.7.0 released

2013-08-17 Thread Bruno Medeiros
On 16/08/2013 22:05, Piotr Szturmaj wrote: I've pointed path to the DMD compiler executable but the library paths weren't filled automatically. Maybe it's a bug? (eclipse CDT Kepler) Yeah, it is a bug. It was a new feature in this release, but I made a mistake creating the test case (and then

Re: DDT 0.7.0 released

2013-08-17 Thread Bruno Medeiros
On 16/08/2013 12:08, Jacob Carlborg wrote: On 2013-08-15 21:20, Bruno Medeiros wrote: A new version of DDT - D Development tools is out. The major change is the new parser which is updated to the latest version of D, and is much more robust than the previous one. Full changelog/info here: https

Re: D reaches 1000 questions on stackoverflow

2013-08-17 Thread John Colvin
On Saturday, 17 August 2013 at 09:21:27 UTC, Paul Jurczak wrote: On Saturday, 17 August 2013 at 01:05:18 UTC, Tyler Jameson Little wrote: [..] It's true though that there are much better answers (and questions) here than on SO, and I'm beginning to shift my search from Google to the forum sear

Re: D reaches 1000 questions on stackoverflow

2013-08-17 Thread Paul Jurczak
On Saturday, 17 August 2013 at 01:05:18 UTC, Tyler Jameson Little wrote: [..] It's true though that there are much better answers (and questions) here than on SO, and I'm beginning to shift my search from Google to the forum search, but this isn't something a newcomer will know to do, especial