Home
last modified time | relevance | path

Searched refs:black_box (Results 1 – 25 of 44) sorted by relevance

12

/external/rust/crates/itertools/benches/
Dbench1.rs1 use criterion::{black_box, criterion_group, criterion_main, Criterion};
19 black_box(elt); in slice_iter()
29 black_box(elt); in slice_iter_rev()
37 let xs = black_box(xs); in zip_default_zip()
38 let ys = black_box(ys); in zip_default_zip()
43 black_box(x); in zip_default_zip()
44 black_box(y); in zip_default_zip()
53 let xs = black_box(xs); in zipdot_i32_default_zip()
54 let ys = black_box(ys); in zipdot_i32_default_zip()
70 let xs = black_box(xs); in zipdot_f32_default_zip()
[all …]
Dcombinations.rs1 use criterion::{black_box, criterion_group, criterion_main, Criterion};
15 black_box(vec![i]); in comb_for1()
26 black_box(vec![i, j]); in comb_for2()
39 black_box(vec![i, j, k]); in comb_for3()
54 black_box(vec![i, j, k, l]); in comb_for4()
67 black_box(combo); in comb_c1()
77 black_box(combo); in comb_c2()
87 black_box(combo); in comb_c3()
97 black_box(combo); in comb_c4()
107 black_box(combo); in comb_c14()
Dtuple_combinations.rs1 use criterion::{black_box, criterion_group, criterion_main, Criterion};
14 black_box(i); in tuple_comb_for1()
25 black_box(i + j); in tuple_comb_for2()
38 black_box(i + j + k); in tuple_comb_for3()
53 black_box(i + j + k + l); in tuple_comb_for4()
66 black_box(i); in tuple_comb_c1()
76 black_box(i + j); in tuple_comb_c2()
86 black_box(i + j + k); in tuple_comb_c3()
96 black_box(i + j + k + l); in tuple_comb_c4()
Dcombinations_with_replacement.rs1 use criterion::{black_box, criterion_group, criterion_main, Criterion};
8 black_box(i); in comb_replacement_n10_k5()
18 black_box(i); in comb_replacement_n5_k10()
28 black_box(i); in comb_replacement_n10_k10()
Dpowerset.rs1 use criterion::{black_box, criterion_group, criterion_main, Criterion};
16 black_box(elt); in powerset_n()
/external/rust/crates/bytes/benches/
Dbytes_mut.rs13 test::black_box(BytesMut::with_capacity(12)); in alloc_small()
21 test::black_box(BytesMut::with_capacity(128)); in alloc_mid()
28 test::black_box(BytesMut::with_capacity(4096)); in alloc_big()
39 test::black_box(&buf[..]); in deref_unique()
51 test::black_box(&buf[..]); in deref_unique_unroll()
52 test::black_box(&buf[..]); in deref_unique_unroll()
53 test::black_box(&buf[..]); in deref_unique_unroll()
54 test::black_box(&buf[..]); in deref_unique_unroll()
55 test::black_box(&buf[..]); in deref_unique_unroll()
56 test::black_box(&buf[..]); in deref_unique_unroll()
[all …]
Dbytes.rs15 test::black_box(&buf[..]); in deref_unique()
27 test::black_box(&buf[..]); in deref_shared()
38 test::black_box(&buf[..]); in deref_static()
50 test::black_box(&bytes.clone()); in clone_static()
61 test::black_box(&bytes.clone()); in clone_shared()
73 test::black_box(&bytes.clone()); in clone_arc_vec()
84 test::black_box(buf); in from_long_slice()
93 test::black_box(b.slice(i % 100..i % 100)); in slice_empty()
104 test::black_box(b.slice(1..2 + i % 10)); in slice_short_from_arc()
115 test::black_box(b.split_off(100)); in split_off_and_drop()
[all …]
Dbuf.rs113 test::black_box(buf.$method($($arg,)*));
127 test::black_box(buf.$method($($arg,)*));
140 test::black_box(buf.get_u8());
/external/rust/crates/ahash/tests/
Dbench.rs76 ParameterizedBenchmark::new("u8", |b, &s| b.iter(|| black_box(aeshash(s))), &U8_VALUES), in bench_ahash()
80 ParameterizedBenchmark::new("u16", |b, &s| b.iter(|| black_box(aeshash(s))), &U16_VALUES), in bench_ahash()
84 ParameterizedBenchmark::new("u32", |b, &s| b.iter(|| black_box(aeshash(s))), &U32_VALUES), in bench_ahash()
88 ParameterizedBenchmark::new("u64", |b, &s| b.iter(|| black_box(aeshash(s))), &U64_VALUES), in bench_ahash()
92 ParameterizedBenchmark::new("u128", |b, &s| b.iter(|| black_box(aeshash(s))), &U128_VALUES), in bench_ahash()
96 … ParameterizedBenchmark::new("string", |b, s| b.iter(|| black_box(aeshash(s))), gen_strings()), in bench_ahash()
103 … ParameterizedBenchmark::new("u8", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U8_VALUES), in bench_fallback()
107 … ParameterizedBenchmark::new("u16", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U16_VALUES), in bench_fallback()
111 … ParameterizedBenchmark::new("u32", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U32_VALUES), in bench_fallback()
115 … ParameterizedBenchmark::new("u64", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U64_VALUES), in bench_fallback()
[all …]
/external/rust/crates/protobuf/benches/
Dcoded_input_stream.rs20 test::black_box(r) in make_bytes()
27 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_byte()
29 test::black_box(is.read_raw_byte().expect("read")); in read_byte()
38 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_byte_no_eof()
40 test::black_box(is.read_raw_byte().expect("read")); in read_byte_no_eof()
50 let mut v = io::Cursor::new(test::black_box(&v)); in read_byte_from_vec()
57 test::black_box(buf); in read_byte_from_vec()
74 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_varint_12()
77 test::black_box(is.read_raw_varint32().expect("read")); in read_varint_12()
96 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_varint_1()
[all …]
Dcoded_output_stream.rs14 os.write_raw_byte(test::black_box(i as u8)).unwrap(); in buffer_write_byte()
22 os.write_raw_bytes(test::black_box(b"1234567890")).unwrap(); in buffer_write_bytes()
/external/rust/crates/idna/benches/
Dall.rs5 use bencher::{black_box, Bencher};
11 bench.iter(|| config.to_unicode(black_box(encoded))); in to_unicode_puny_label()
17 bench.iter(|| config.to_unicode(black_box(encoded))); in to_unicode_ascii()
23 bench.iter(|| config.to_unicode(black_box(encoded))); in to_unicode_merged_label()
29 bench.iter(|| config.to_ascii(black_box(encoded))); in to_ascii_puny_label()
35 bench.iter(|| config.to_ascii(black_box(encoded))); in to_ascii_simple()
41 bench.iter(|| config.to_ascii(black_box(encoded))); in to_ascii_merged()
/external/rust/crates/criterion/src/
Dbencher.rs5 use crate::black_box;
88 black_box(routine()); in iter()
258 let input = black_box(setup()); in iter_batched()
265 drop(black_box(output)); in iter_batched()
273 let inputs = black_box((0..batch_size).map(|_| setup()).collect::<Vec<_>>()); in iter_batched()
281 black_box(outputs); in iter_batched()
348 let mut input = black_box(setup()); in iter_batched_ref()
355 drop(black_box(output)); in iter_batched_ref()
356 drop(black_box(input)); in iter_batched_ref()
364 let mut inputs = black_box((0..batch_size).map(|_| setup()).collect::<Vec<_>>()); in iter_batched_ref()
[all …]
/external/rust/crates/itoa/benches/
Dbench.rs16 use test::{Bencher, black_box};
27 itoa::write(&mut buf, black_box($value)).unwrap()
34 use test::{Bencher, black_box};
45 itoa::fmt(&mut buf, black_box($value)).unwrap()
52 use test::{Bencher, black_box};
63 write!(&mut buf, "{}", black_box($value)).unwrap()
/external/rust/crates/uuid/benches/
Dformat_str.rs14 test::black_box(buffer); in bench_hyphen()
24 test::black_box(buffer); in bench_simple()
34 test::black_box(buffer); in bench_urn()
44 test::black_box(buffer); in bench_encode_hyphen()
54 test::black_box(buffer); in bench_encode_simple()
64 test::black_box(buffer); in bench_encode_urn()
Dserde_support.rs17 test::black_box(buffer); in bench_json_encode()
35 test::black_box(buffer); in bench_bincode_encode()
/external/rust/crates/ryu/benches/
Dbench.rs9 use test::{black_box, Bencher};
21 let value = black_box($value);
23 black_box(formatted);
38 let value = black_box($value);
40 black_box(buf.as_slice());
/external/rust/crates/hashbrown/benches/
Dbench.rs9 use test::{black_box, Bencher};
91 black_box(&mut m);
117 black_box(&mut m);
150 black_box(m.remove(&remove));
152 black_box(m);
180 black_box(m.get(&i));
210 black_box(m.get(&i));
238 black_box(i);
263 black_box(m.clone()); in clone_small()
277 black_box(&mut m2); in clone_from_small()
[all …]
/external/rust/crates/chrono/benches/
Dchrono.rs6 use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
14 let str = black_box("Wed, 18 Feb 2015 23:16:09 +0000"); in bench_datetime_parse_from_rfc2822()
23 let str = black_box("2015-02-18T23:59:60.234567+05:00"); in bench_datetime_parse_from_rfc3339()
33 let str = black_box("2019-03-30T18:46:57.193Z"); in bench_datetime_from_str()
42 c.bench_function("bench_datetime_to_rfc2822", |b| b.iter(|| black_box(dt).to_rfc2822())); in bench_datetime_to_rfc2822()
48 c.bench_function("bench_datetime_to_rfc3339", |b| b.iter(|| black_box(dt).to_rfc3339())); in bench_datetime_to_rfc3339()
Dserde.rs4 use criterion::{black_box, criterion_group, criterion_main, Criterion};
12 black_box(serde_json::to_string(&dt)).unwrap(); in bench_ser_naivedatetime_string()
24 black_box(serde_json::to_writer(s, &dt)).unwrap(); in bench_ser_naivedatetime_writer()
/external/rust/crates/thread_local/benches/
Dthread_local.rs4 use criterion::{black_box, BatchSize};
15 black_box(local.get()); in main()
23 black_box(local.get_or(|| 0)); in main()
/external/rust/crates/crossbeam-utils/benches/
Datomic_cell.rs15 test::black_box(sum); in load_u8()
60 test::black_box(sum); in concurrent_load_u8()
89 test::black_box(sum); in load_usize()
134 test::black_box(sum); in concurrent_load_usize()
/external/rust/crates/unicode-width/src/
Dtests.rs27 test::black_box(UnicodeWidthChar::width(c)); in cargo()
40 test::black_box(c.width()); in stdlib()
52 test::black_box(simple_width_if(c)); in simple_if()
64 test::black_box(simple_width_match(c)); in simple_match()
/external/rust/crates/gdbstub/src/internal/
Ddead_code_marker.rs11 pub fn black_box<T>(dummy: T) -> T { in black_box() function
35 crate::internal::dead_code_marker::black_box(concat!("<", $feature, ",", $ctx, ">"));
/external/rust/crates/getrandom/benches/
Dmod.rs9 test::black_box(&buf); in bench_64()
19 test::black_box(&buf); in bench_65536()

12