Skip to content

Commit 32bc01a

Browse files
committed
docs(readme): add more benchmark results
1 parent 446588d commit 32bc01a

File tree

1 file changed

+111
-29
lines changed

1 file changed

+111
-29
lines changed

README.md

Lines changed: 111 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A bit vector with [the Rust standard library's portable SIMD API](https://github.com/rust-lang/portable-simd).
44

5-
## How to use
5+
## Usage
66

77
```rust
88
let mut bitvec = BitVec::ones(1000); // create a bitvec contains 0 ..= 999
@@ -23,58 +23,140 @@ assert_eq!(new_bitvec, new_bitvec2);
2323

2424
Compared on AMD Ryzen 9 5900hs, aginst:
2525

26-
* [bit\_vec 0.6.3](https://docs.rs/bit-vec/0.6.3/bit_vec/index.html)
26+
* [bit_vec 0.6.3](https://docs.rs/bit-vec/0.6.3/bit_vec/index.html)
2727
* [bitvec 1.0.0](https://docs.rs/bitvec/1.0.0/bitvec/index.html)
28+
* [bitvec_simd 0.15.0](https://docs.rs/bitvec_simd/0.15.0/bitvec_simd/index.html)
29+
* [bitvector_simd 0.2.2](https://docs.rs/bitvector_simd/0.2.2/bitvector_simd/index.html)
30+
31+
<summary><strong>:eyes: See all benchmarks</strong></summary>
32+
33+
<details open>
2834

2935
```
3036
$ cargo bench
3137
32-
bitsvec(this crate) time: [348.51 ns 348.74 ns 348.98 ns]
33-
Found 7 outliers among 100 measurements (7.00%)
34-
7 (7.00%) high mild
38+
bitsvec(this crate) time: [330.34 ns 330.75 ns 331.18 ns]
39+
Found 6 outliers among 100 measurements (6.00%)
40+
4 (4.00%) high mild
41+
2 (2.00%) high severe
3542
3643
bitsvec_u16x8(this crate)
37-
time: [401.90 ns 403.02 ns 404.94 ns]
38-
Found 3 outliers among 100 measurements (3.00%)
39-
1 (1.00%) low mild
44+
time: [332.23 ns 333.90 ns 335.98 ns]
45+
Found 16 outliers among 100 measurements (16.00%)
46+
6 (6.00%) high mild
47+
10 (10.00%) high severe
48+
49+
bitvec_simd 0.15.0 time: [371.96 ns 372.23 ns 372.53 ns]
50+
Found 6 outliers among 100 measurements (6.00%)
51+
4 (4.00%) high mild
4052
2 (2.00%) high severe
4153
42-
bit-vec 0.6 time: [1.5891 us 1.5956 us 1.6034 us]
43-
Found 13 outliers among 100 measurements (13.00%)
54+
bitvec_simd 0.15.0 u16x8
55+
time: [578.38 ns 578.68 ns 579.01 ns]
56+
Found 7 outliers among 100 measurements (7.00%)
4457
6 (6.00%) high mild
45-
7 (7.00%) high severe
58+
1 (1.00%) high severe
4659
47-
bitvec 1.0 time: [32.228 us 32.516 us 32.821 us]
48-
Found 16 outliers among 100 measurements (16.00%)
49-
13 (13.00%) low severe
50-
3 (3.00%) high mild
60+
bitvector_simd 0.2.2 time: [288.55 ns 289.11 ns 289.64 ns]
61+
Found 1 outliers among 100 measurements (1.00%)
62+
1 (1.00%) high mild
63+
64+
bit-vec 0.6 time: [1.5177 us 1.5200 us 1.5224 us]
65+
66+
bitvec 1.0 time: [32.119 us 32.254 us 32.390 us]
5167
5268
bitsvec(this crate) with creation
53-
time: [884.09 ns 884.70 ns 885.35 ns]
54-
Found 6 outliers among 100 measurements (6.00%)
69+
time: [888.59 ns 889.45 ns 890.39 ns]
70+
Found 10 outliers among 100 measurements (10.00%)
71+
9 (9.00%) high mild
72+
1 (1.00%) high severe
73+
74+
Benchmarking bitsvec_u16x8(this crate) with creation: Collecting 100 samples in estimated 5.0053 s (4.5M iteration bitsvec_u16x8(this crate) with creation
75+
time: [1.1006 us 1.1031 us 1.1059 us]
76+
Found 11 outliers among 100 measurements (11.00%)
77+
8 (8.00%) high mild
78+
3 (3.00%) high severe
79+
80+
bitvec_simd 0.15.0 with creation
81+
time: [970.09 ns 970.82 ns 971.67 ns]
82+
Found 12 outliers among 100 measurements (12.00%)
83+
10 (10.00%) high mild
84+
2 (2.00%) high severe
85+
86+
Benchmarking bitsvec_simd 0.15.0 u16x8 with creation: Collecting 100 samples in estimated 5.0009 s (4.5M iteration bitvec_simd 0.15.0 u16x8 with creation
87+
time: [1.1158 us 1.1185 us 1.1215 us]
88+
Found 8 outliers among 100 measurements (8.00%)
89+
6 (6.00%) low mild
5590
2 (2.00%) high mild
56-
4 (4.00%) high severe
5791
58-
bitsvec_u16x8(this crate) with creation
59-
time: [878.66 ns 879.61 ns 880.66 ns]
60-
Found 4 outliers among 100 measurements (4.00%)
61-
3 (3.00%) high mild
92+
bitvector_simd 0.2.2 with creation
93+
time: [736.46 ns 737.95 ns 739.49 ns]
94+
Found 1 outliers among 100 measurements (1.00%)
6295
1 (1.00%) high severe
6396
6497
bit-vec 0.6 with creation
65-
time: [495.50 ns 495.87 ns 496.27 ns]
66-
Found 6 outliers among 100 measurements (6.00%)
98+
time: [1.6515 us 1.6527 us 1.6539 us]
99+
Found 2 outliers among 100 measurements (2.00%)
67100
2 (2.00%) high mild
68-
4 (4.00%) high severe
69101
70102
bitvec 1.0 with creation
71-
time: [29.003 us 29.028 us 29.058 us]
72-
Found 15 outliers among 100 measurements (15.00%)
73-
5 (5.00%) low severe
74-
8 (8.00%) high mild
103+
time: [28.484 us 28.501 us 28.518 us]
104+
Found 20 outliers among 100 measurements (20.00%)
105+
15 (15.00%) low severe
106+
3 (3.00%) high mild
75107
2 (2.00%) high severe
108+
109+
bitsvec(this crate) resize false
110+
time: [676.30 ns 677.13 ns 677.93 ns]
111+
112+
Benchmarking bitsvec_u16x8(this crate) resize false: Collecting 100 samples in estimated 5.0010 s (8.0M iterations bitsvec_u16x8(this crate) resize false
113+
time: [618.70 ns 619.73 ns 620.98 ns]
114+
Found 2 outliers among 100 measurements (2.00%)
115+
1 (1.00%) high mild
116+
1 (1.00%) high severe
117+
118+
bitvec_simd 0.15.0 resize false
119+
time: [676.27 ns 677.96 ns 679.66 ns]
120+
Found 4 outliers among 100 measurements (4.00%)
121+
3 (3.00%) high mild
122+
1 (1.00%) high severe
123+
124+
bitvec_simd 0.15.0 u16x8 resize false
125+
time: [472.84 ns 473.76 ns 474.71 ns]
126+
Found 2 outliers among 100 measurements (2.00%)
127+
2 (2.00%) high mild
128+
129+
bitvec 1.0 resize false time: [108.23 us 108.29 us 108.36 us]
130+
Found 9 outliers among 100 measurements (9.00%)
131+
6 (6.00%) high mild
132+
3 (3.00%) high severe
133+
134+
bitsvec(this crate) resize true
135+
time: [679.71 ns 680.66 ns 681.75 ns]
136+
Found 9 outliers among 100 measurements (9.00%)
137+
7 (7.00%) high mild
138+
2 (2.00%) high severe
139+
140+
bitsvec_u16x8(this crate) resize true
141+
time: [876.21 ns 876.89 ns 877.71 ns]
142+
Found 8 outliers among 100 measurements (8.00%)
143+
6 (6.00%) high mild
144+
2 (2.00%) high severe
145+
146+
bitvec_simd 0.15.0 resize true
147+
time: [672.44 ns 672.82 ns 673.24 ns]
148+
Found 9 outliers among 100 measurements (9.00%)
149+
6 (6.00%) high mild
150+
3 (3.00%) high severe
151+
152+
bitvec_simd 0.15.0 u16x8 resize true
153+
time: [748.77 ns 751.48 ns 754.59 ns]
154+
155+
bitvec 1.0 resize true time: [100.50 us 100.63 us 100.75 us]
76156
```
77157

158+
</details open>
159+
78160
## Credits
79161

80162
Most code of this crate is from (https://github.com/GCCFeli/bitvec_simd). On top of that, some changes were made.

0 commit comments

Comments
 (0)