benchmark on binary trees

visitor via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 8 04:53:44 PST 2015


using Apache Portable Runtime(APR) like in the C version :
http://dpaste.dzfl.pl/6ca8b5ffd6dc

works like a charm, 2.061s on my machine !

if file name is binarytrees.d
dmd -w -inline -O -release -I/usr/include/apr-1.0 
-L/usr/lib/x86_64-linux-gnu/libapr-1.so -of"binarytrees" 
"binarytrees.d"

measured with "time ./binarytrees 20" on command line:
real	0m2.061s
user	0m8.156s
sys	0m0.181s

C version gives :
real	0m1.892s
user	0m9.087s
sys	0m0.188s

Not bad !!! :-D

Still i would like to know what i'm doing wrong with the 
allocator's version, besides the fact that apr tools are doing 
more sophisticated work than my naive approach :-D ?


More information about the Digitalmars-d-learn mailing list