Mercurial > projects > doodle
view 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 |
line wrap: on
line source
import std.stdio; import std.random; import std.string; int main(string[] args) { /* struct S { string[] names; } */ bool[ubyte[16]] aa; for (int count = 0; ; ++count) { ubyte[16] digest; foreach (ref a; digest) { a = cast(ubyte)uniform(0, 256); } /* auto s = S(); s.names ~= "hello"; aa[digest] = s; */ aa[digest] = true; if (count % 1000 == 0) { writefln("%s %s", count, digest); } //writefln("%s %s", count, digest); } return 0; }