|
29 | 29 | - type `AsRef<[u8]> -> u64`
|
30 | 30 | - type `AsRef<[u8]> -> u128`
|
31 | 31 | - Convert hex to array
|
32 |
| - - type `AsRef<[u8]> -> [u8; N]`, `N = { [1, 64], 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536 }` |
| 32 | + - type `AsRef<[u8]> -> [u8; N]` |
| 33 | + - type `AsRef<[u8]> -> SmallVec<[u8; 64]>` |
33 | 34 | - type `AsRef<[u8]> -> Vec<u8>`
|
34 | 35 |
|
35 | 36 | #### `Hex` trait
|
|
47 | 48 | - type `u64 -> String`
|
48 | 49 | - type `u128 -> String`
|
49 | 50 | - Convert array to hex
|
50 |
| - - type `Vec<u8> -> String` |
51 |
| - - type `[u8; N] -> String`, `N = { [1, 64], 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536 }` |
| 51 | + - type `[u8; N] -> String` |
| 52 | + - type `&[u8; N] -> String` |
52 | 53 | - type `&[u8] -> String`
|
| 54 | + - type `Vec<u8> -> String` |
| 55 | + - type `&Vec<u8> -> String` |
53 | 56 |
|
54 | 57 | #### `slice` prefixed functions
|
55 | 58 | - Build fixed length `Array` from `Slice`
|
|
73 | 76 | - Transform hex from `Array`
|
74 | 77 | - type `&str -> [u8; N]`
|
75 | 78 | - Convert hex to bytes
|
76 |
| - - type `AsRef<[u8]> -> Vec<u8>` |
| 79 | + - type `AsRef<[u8]> -> SmallVec<[u8; 64]>` |
77 | 80 | - Convert hex to `Slice`
|
78 | 81 | - type `AsRef<[u8]> -> &[u8]`
|
79 | 82 | - Transform hex to `T`
|
|
102 | 105 | <div align="right"><sub>Tuesday, January 9th, 2024</sub></div>
|
103 | 106 |
|
104 | 107 | ```rs
|
105 |
| -array_bytes::bytes2hex time: [26.426 µs 26.473 µs 26.518 µs] |
106 |
| -Found 4 outliers among 100 measurements (4.00%) |
107 |
| - 2 (2.00%) low mild |
108 |
| - 1 (1.00%) high mild |
109 |
| - 1 (1.00%) high severe |
110 |
| - |
111 |
| -const_hex::encode time: [994.78 ns 1.0084 µs 1.0232 µs] |
112 |
| - |
113 |
| -faster_hex::hex_string time: [11.728 µs 11.769 µs 11.815 µs] |
114 |
| - |
| 108 | +array_bytes::bytes2hex time: [11.175 µs 11.198 µs 11.219 µs] |
| 109 | +const_hex::encode time: [1.2195 µs 1.2381 µs 1.2564 µs] |
| 110 | +faster_hex::hex_string time: [12.058 µs 12.089 µs 12.123 µs] |
115 | 111 | faster_hex::hex_encode_fallback
|
116 |
| - time: [11.704 µs 11.737 µs 11.773 µs] |
117 |
| -Found 1 outliers among 100 measurements (1.00%) |
118 |
| - 1 (1.00%) high mild |
119 |
| - |
120 |
| -hex::encode time: [86.105 µs 86.250 µs 86.433 µs] |
121 |
| -Found 14 outliers among 100 measurements (14.00%) |
122 |
| - 1 (1.00%) low severe |
123 |
| - 4 (4.00%) low mild |
124 |
| - 6 (6.00%) high mild |
125 |
| - 3 (3.00%) high severe |
126 |
| - |
127 |
| -rustc_hex::to_hex time: [44.486 µs 45.538 µs 46.723 µs] |
128 |
| -Found 16 outliers among 100 measurements (16.00%) |
129 |
| - 1 (1.00%) low mild |
130 |
| - 2 (2.00%) high mild |
131 |
| - 13 (13.00%) high severe |
132 |
| - |
133 |
| -array_bytes::hex2bytes time: [43.576 µs 44.529 µs 45.404 µs] |
134 |
| - Performance has regressed. |
135 |
| -Found 11 outliers among 100 measurements (11.00%) |
136 |
| - 7 (7.00%) low mild |
137 |
| - 4 (4.00%) high mild |
| 112 | + time: [12.055 µs 12.095 µs 12.135 µs] |
| 113 | +hex::encode time: [73.787 µs 75.290 µs 76.798 µs] |
| 114 | +rustc_hex::to_hex time: [43.948 µs 44.517 µs 45.504 µs] |
138 | 115 |
|
| 116 | +array_bytes::hex2bytes time: [19.294 µs 19.383 µs 19.500 µs] |
139 | 117 | array_bytes::hex2bytes_unchecked
|
140 |
| - time: [64.190 µs 65.311 µs 66.359 µs] |
141 |
| - |
142 |
| -array_bytes::hex2slice time: [45.484 µs 46.988 µs 48.736 µs] |
143 |
| - Performance has regressed. |
144 |
| -Found 12 outliers among 100 measurements (12.00%) |
145 |
| - 2 (2.00%) high mild |
146 |
| - 10 (10.00%) high severe |
147 |
| - |
| 118 | + time: [19.507 µs 19.666 µs 19.850 µs] |
| 119 | +array_bytes::hex2slice time: [23.608 µs 24.087 µs 24.598 µs] |
148 | 120 | array_bytes::hex2slice_unchecked
|
149 |
| - time: [62.339 µs 63.317 µs 64.279 µs] |
150 |
| - Performance has regressed. |
151 |
| - |
152 |
| -const_hex::decode time: [13.601 µs 13.629 µs 13.665 µs] |
153 |
| - Performance has improved. |
154 |
| -Found 2 outliers among 100 measurements (2.00%) |
155 |
| - 1 (1.00%) low mild |
156 |
| - 1 (1.00%) high severe |
157 |
| - |
158 |
| -faster_hex::hex_decode time: [28.015 µs 28.061 µs 28.110 µs] |
159 |
| - Performance has improved. |
160 |
| -Found 1 outliers among 100 measurements (1.00%) |
161 |
| - 1 (1.00%) high mild |
162 |
| - |
| 121 | + time: [21.853 µs 22.428 µs 23.048 µs] |
| 122 | +const_hex::decode time: [13.999 µs 14.018 µs 14.037 µs] |
| 123 | +faster_hex::hex_decode time: [28.983 µs 29.028 µs 29.075 µs] |
163 | 124 | faster_hex::hex_decode_unchecked
|
164 |
| - time: [11.782 µs 11.797 µs 11.812 µs] |
165 |
| -Found 3 outliers among 100 measurements (3.00%) |
166 |
| - 2 (2.00%) low severe |
167 |
| - 1 (1.00%) low mild |
168 |
| - |
| 125 | + time: [11.908 µs 11.926 µs 11.947 µs] |
169 | 126 | faster_hex::hex_decode_fallback
|
170 |
| - time: [11.748 µs 11.767 µs 11.785 µs] |
171 |
| -Found 7 outliers among 100 measurements (7.00%) |
172 |
| - 2 (2.00%) low severe |
173 |
| - 4 (4.00%) low mild |
174 |
| - 1 (1.00%) high mild |
175 |
| - |
176 |
| -hex::decode time: [93.055 µs 94.781 µs 96.583 µs] |
177 |
| - |
178 |
| -hex::decode_to_slice time: [31.949 µs 33.509 µs 35.285 µs] |
179 |
| -Found 13 outliers among 100 measurements (13.00%) |
180 |
| - 5 (5.00%) high mild |
181 |
| - 8 (8.00%) high severe |
182 |
| - |
183 |
| -rustc_hex::from_hex time: [105.99 µs 108.05 µs 110.11 µs] |
| 127 | + time: [11.909 µs 11.924 µs 11.940 µs] |
| 128 | +hex::decode time: [96.566 µs 99.398 µs 102.23 µs] |
| 129 | +hex::decode_to_slice time: [41.424 µs 42.312 µs 43.448 µs] |
184 | 130 | ```
|
185 | 131 |
|
186 | 132 | <div align="right">
|
|
0 commit comments