Intermediate Rust
Q82 / 100

What is Rust's std::hint::black_box?

Correct! Well done.

Incorrect.

The correct answer is B) A function that prevents the compiler from optimizing away computations in benchmarks

B

Correct Answer

A function that prevents the compiler from optimizing away computations in benchmarks

Explanation

criterion benchmarks use black_box(input) to prevent the optimizer from constant-folding the benchmark away, ensuring accurate measurements.

Progress
82/100