You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only for x86_64 CPUs supporting VPCLMULQD. Gated behind builds using
+nightly with the “vpclmulqdq” feature flag.
Provides nearly a 2X boost in throughput. CRC-64/NVME is now ~96GiB/s on
Intel Sapphire Rapids (AWS EC2 c7i.metal-48xl), up from ~56GiB/s.
let test_string = b"12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456";
158
+
159
+
for config inTEST_ALL_CONFIGS{
160
+
let actual = unsafe{
161
+
update(
162
+
config.get_init(),
163
+
&*create_aligned_data(test_string),
164
+
*config.get_params(),
165
+
) ^ config.get_xorout()
166
+
};
167
+
168
+
assert_eq!(
169
+
actual,
170
+
config.checksum_with_reference(test_string),
171
+
"Mismatch CRC, {}, expected {:#x}, got {:#x}",
172
+
config.get_name(),
173
+
config.get_check(),
174
+
actual
175
+
);
176
+
}
177
+
}
178
+
179
+
#[test]
180
+
fntest_1024_string(){
181
+
let test_string = b"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345612345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456";
182
+
183
+
for config inTEST_ALL_CONFIGS{
184
+
let actual = unsafe{
185
+
update(
186
+
config.get_init(),
187
+
&*create_aligned_data(test_string),
188
+
*config.get_params(),
189
+
) ^ config.get_xorout()
190
+
};
191
+
192
+
assert_eq!(
193
+
actual,
194
+
config.checksum_with_reference(test_string),
195
+
"Mismatch CRC, {}, expected {:#x}, got {:#x}",
196
+
config.get_name(),
197
+
config.get_check(),
198
+
actual
199
+
);
200
+
}
201
+
}
202
+
126
203
// CRC-64/NVME is a special flower in that Rust's crc library doesn't support it yet, so we have
127
204
// tested values to check against.
128
205
#[test]
@@ -287,7 +364,7 @@ mod tests {
287
364
assert_eq!(
288
365
actual,
289
366
expected,
290
-
"\nFailed for {} with length {}\\nGot: {:016x}\nExpected: {:016x}",
367
+
"\nFailed for {} with length {}\nGot: {:016x}\nExpected: {:016x}",
0 commit comments