| Crates.io | cost |
| lib.rs | cost |
| version | 0.1.1 |
| created_at | 2022-01-13 00:15:39.825514+00 |
| updated_at | 2022-01-13 00:16:50.520934+00 |
| description | measure the cost of running your functions |
| homepage | |
| repository | |
| max_upload_size | |
| id | 513101 |
| size | 2,797 |
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);