cost

Crates.iocost
lib.rscost
version0.1.1
sourcesrc
created_at2022-01-13 00:15:39.825514
updated_at2022-01-13 00:16:50.520934
descriptionmeasure the cost of running your functions
homepage
repository
max_upload_size
id513101
size2,797
(znx3p0)

documentation

README

Cost

Measure the cost of running a function.

This library exposes a function which takes a callback and returns the cost of running that function.

let (cost, num) = cost(|| fibonacci(20));
println!("it cost {} instructions to compute {}", cost, num);
Commit count: 0

cargo fmt