DMD 1.034 and 2.018 releases
bearophile
bearophileHUGS at lycos.com
Fri Aug 8 17:43:04 PDT 2008
Probably I am missing something important, I have tried this code with the 1.034 (that compiles my large d libs fine), but I have found many problems:
import std.stdio: putr = writefln;
void main() {
int[] a1 = [1, 2, 3];
int[] a2 = [2, 4, 6];
//putr(a1[] + a2[]); // test.d(6): Error: Array operations not implemented
auto a3 = a1[] + 4;
putr(a3); // [1,2,3,0,0,0,0]
int[] a4 = a1[] + a2[]; // test.d(12): Error: Array operations not implemented
int[] a5 = [3, 5, 7, 9];
int[] a6 = a1 + a5; // test.d(16): Error: Array operations not implemented
int[] a7;
a7[] = a1[] + a2[];
putr(a7); // prints: []
auto a8 = a1 + a2; // test.d(21): Error: Array operations not implemented
putr(a8);
}
Few more questions/notes:
- I like a syntax as a+b and a[]+4 instead of a[]+b[] and a[]+4, I am used to that from PyLab, etc.
- How does it works (or not works) with jagged/square matrices?
- When possible I'm do few benchmarks compared to normal D code, C code compiled normally with GCC and C code automatically vectorized by GCC.
- Is it able to compute a+b+c with a single loop (as all Fortran compilers do)? I presume the answer is negative.
- Hopefully in the future they may support the SSE3/SSSE3 too that my CPU supports.
Bye, and good work,
bearophile
More information about the Digitalmars-d-announce
mailing list