comparison doodle/utils/prog/hash_test.d @ 112:b569d7d5064f

Added some utilities that are a work in progress.
author David Bryant <bagnose@gmail.com>
date Thu, 14 Apr 2011 11:27:17 +0930
parents
children 8343c1dafac6
comparison
equal deleted inserted replaced
111:0387a790e619 112:b569d7d5064f
1 import std.stdio;
2 import std.random;
3 import std.string;
4
5 int main(string[] args) {
6 /*
7 struct S {
8 string[] names;
9 }
10 */
11
12 bool[ubyte[16]] aa;
13
14 for (int count = 0; ; ++count) {
15 ubyte[16] digest;
16 foreach (ref a; digest) {
17 a = cast(ubyte)uniform(0, 256);
18 }
19
20 /*
21 auto s = S();
22 s.names ~= "hello";
23 aa[digest] = s;
24 */
25 aa[digest] = true;
26
27 if (count % 1000 == 0) {
28 writefln("%s %s", count, digest);
29 }
30
31 //writefln("%s %s", count, digest);
32 }
33
34 return 0;
35 }