version with apr (like in c version) http://dpaste.dzfl.pl/68c0157225e7 compiled with ldc it's indeed a bit faster on average : real 0m1.999s user 0m9.810s sys 0m0.148
btw Rust version is even faster than my little bit outdated gcc (4.9)
latest try with allocators : http://dpaste.dzfl.pl/86b9b3c4ad71 swallows huge memory, slow ! what am i doing wrong ? (concurrency problem ?)