Ready for review: new std.uni
David Nadlinger
see at klickverbot.at
Fri Jan 11 12:38:25 PST 2013
On Friday, 11 January 2013 at 19:31:13 UTC, Dmitry Olshansky
wrote:
> The code, including extra tests and a benchmark is here:
> https://github.com/blackwhale/gsoc-bench-2012
Phew, that repository is quite a hefty checkout with all the
example data.
Just for the fun of it, a completely irreproducible, unscientific
benchmark (sorry, Andrei!) run on a Core i7 M 620 under Linux
x86_64:
DMD 2.061
---
$ rdmd -O -release -noboundscheck -inline char_class.d
enwiki-latest-all-titles-in-ns0
Creating level 1 of Tries.
Alpha:262144
Mark:262144
Number:262144
Symbol:262144
Creating level 2 of Tries.
Alpha:9472
Mark:6656
Number:6656
Symbol:6400
Creating level 3 of Tries.
Alpha:4000
Mark:2304
Number:2432
Symbol:2848
Creating level 4 of Tries.
Alpha:3376
Mark:1976
Number:1624
Symbol:2096
Time to build dchar array: 2702 ms
Baselines
noop [enwiki], 217.335, 888.99 M/s
new-std-alpha [enwiki], 1197.49, 161.34 M/s
new-std-mark [enwiki], 6374.73, 30.31 M/s
new-std-num [enwiki], 6290.89, 30.71 M/s
new-std-sym [enwiki], 6500.93, 29.72 M/s
new-std-white [enwiki], 822.245, 234.98 M/s
combining class [enwiki], 5948.63, 32.48 M/s
inv-alpha [enwiki], 10290, 18.78 M/s
inv-mark [enwiki], 9229.2, 20.93 M/s
inv-num [enwiki], 9046.48, 21.36 M/s
inv-sym [enwiki], 9843.59, 19.63 M/s
Tries of level 1
trie-alpha [enwiki], 2179.17, 88.66 M/s
trie-mark [enwiki], 1912.54, 101.02 M/s
trie-num [enwiki], 1924.92, 100.37 M/s
trie-sym [enwiki], 1911.22, 101.09 M/s
Tries of level 2
trie-alpha [enwiki], 4524.33, 42.70 M/s
trie-mark [enwiki], 4276.92, 45.17 M/s
trie-num [enwiki], 4308.42, 44.84 M/s
trie-sym [enwiki], 4298.68, 44.95 M/s
Tries of level 3
trie-alpha [enwiki], 6407.64, 30.15 M/s
trie-mark [enwiki], 6150.8, 31.41 M/s
trie-num [enwiki], 6095.96, 31.69 M/s
trie-sym [enwiki], 6253.7, 30.89 M/s
Tries of level 4
trie-alpha [enwiki], 8329.66, 23.20 M/s
trie-mark [enwiki], 7993.11, 24.17 M/s
trie-num [enwiki], 8040.94, 24.03 M/s
trie-sym [enwiki], 8033.07, 24.05 M/s
---
LDC (2.061 merge branch):
---
$ rdmd --compiler=ldmd2 -O3 -release -noboundscheck -inline
char_class.d enwiki-latest-all-titles-in-ns0
Alpha:262144
Mark:262144
Number:262144
Symbol:262144
Creating level 2 of Tries.
Alpha:9472
Mark:6656
Number:6656
Symbol:6400
Creating level 3 of Tries.
Alpha:4000
Mark:2304
Number:2432
Symbol:2848
Creating level 4 of Tries.
Alpha:3376
Mark:1976
Number:1624
Symbol:2096
Time to build dchar array: 1962 ms
Baselines
noop [enwiki], 211.516, 913.44 M/s
new-std-alpha [enwiki], 612.324, 315.53 M/s
new-std-mark [enwiki], 577.134, 334.77 M/s
new-std-num [enwiki], 600.996, 321.48 M/s
new-std-sym [enwiki], 577.433, 334.60 M/s
new-std-white [enwiki], 381.535, 506.40 M/s
combining class [enwiki], 517.231, 373.54 M/s
inv-alpha [enwiki], 8181.25, 23.62 M/s
inv-mark [enwiki], 6938.09, 27.85 M/s
inv-num [enwiki], 6347.71, 30.44 M/s
inv-sym [enwiki], 6930.7, 27.88 M/s
Tries of level 1
trie-alpha [enwiki], 275.741, 700.69 M/s
trie-mark [enwiki], 274.972, 702.65 M/s
trie-num [enwiki], 274.558, 703.70 M/s
trie-sym [enwiki], 277.255, 696.86 M/s
Tries of level 2
trie-alpha [enwiki], 453.453, 426.08 M/s
trie-mark [enwiki], 452.912, 426.59 M/s
trie-num [enwiki], 455.004, 424.63 M/s
trie-sym [enwiki], 453.492, 426.04 M/s
Tries of level 3
trie-alpha [enwiki], 577.442, 334.59 M/s
trie-mark [enwiki], 579.054, 333.66 M/s
trie-num [enwiki], 577.95, 334.30 M/s
trie-sym [enwiki], 577.566, 334.52 M/s
Tries of level 4
trie-alpha [enwiki], 778.261, 248.26 M/s
trie-mark [enwiki], 778.943, 248.04 M/s
trie-num [enwiki], 778.352, 248.23 M/s
trie-sym [enwiki], 779.442, 247.88 M/s
---
Haven't had a look at what is going on there yet – it could well
be that some measurement loop is optimized out altogether.
David
More information about the Digitalmars-d
mailing list