slow runtime
Dr. Smith
iam at far.out
Thu Sep 9 20:54:15 PDT 2010
Jonathan, thank you for the quick response. I made some changes as you suggested
and got much more speed. For some code that I'd like to convert to D, I am
exploring the pros and cons of constructing a class library (versus a C like
function library). My code here is just part of that exploration.
... the improved calling code ...
import std.stdio, std.string;
import testlib;
void main() {
classtest obj = new classtest;
double[][] a = obj.hit;
double[][] b = obj.hot;
string c = obj.stest;
int i, j;
for(i = 1; i < a.length; i++) {
for(j = 1; j < a[i].length; j++) {
writefln("%s\t%f\t%f", c, a[i][j], b[i][j]);
}
}
}
More information about the Digitalmars-d-learn
mailing list