import std.stdio; import std.datetime; import std.range; import std.conv; import std.string; //import std.regex; //import core.thread; //Thread.sleep(dur!("seconds")(1)); const SEC_CONV = 0.0000001; const MAX_RANGE = 1000000; long print_start(string s){ write(format(s, MAX_RANGE)); stdout.flush(); return Clock.currStdTime(); } void print_end(long start){ writef("%.3fs\n", (Clock.currStdTime()-start)*SEC_CONV); } void test_dict(){ //[2012-04-05] set 2.251s get 1.957s clear 0.000s long start; string[string] d; string s; write("---- test_dict -----\n"); start = print_start("test dict set (%d)...\t"); for (int i=0; i