Registry / testing / iai
library0.1.1rscratesunverified

One-shot benchmarking library for measuring performance of Rust code.

# Cargo.toml [dependencies] iai = "0.1.1"
INSTALL
IMPORT
SIG · IAI
I
iai
testingrustv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

black_box
use iai::black_box;

Benchmarks a Fibonacci function using black_box to prevent optimization.

use iai::black_box; fn fibonacci(n: u64) -> u64 { match n { 0 => 0, 1 => 1, _ => fibonacci(n - 1) + fibonacci(n - 2), } } fn main() { let result = black_box(fibonacci(30)); println!("Result: {}", result); }
Debug
Known issues
breakingIai is deprecated in favor of Iai-Callgrind; no longer maintained.
fix
Switch to `iai-callgrind` crate for continued support.
affects: >=0.1.0
Upgrade
Version history
0.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
iai — cargo add iai · libregistry