1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Tight-loop driver for profiling the wide-tier strict `exp_strict`
//! path under samply / flamegraph.
//!
//! Each iteration calls `D307s150::from_int(2).exp_strict()` —
//! roughly 90 µs of work per call at the time of writing — wrapped
//! in `black_box` so the optimiser cannot hoist or fold the result.
//!
//! Run under samply (writes to trace/):
//! cargo build --release --features wide,x-wide,xx-wide,macros --example profile_exp
//! samply record -o trace/exp_samply.json.gz target/release/examples/profile_exp.exe
//!
//! Run under cargo-flamegraph (elevated terminal on Windows):
//! flamegraph -o trace/exp_flamegraph.svg -- target/release/examples/profile_exp.exe 10000
//!
//! The `trace/` folder is in .git/info/exclude — profiler artefacts
//! never land in the repo.
//!
//! The 10000-iter default keeps a run at ~1 second of CPU — long
//! enough for samply's 1 ms sampling cadence to land ~1000 stack
//! samples in the exp path, short enough that thermal throttling
//! and SMT noise don't dominate.
use black_box;
use D307;
type Work = ;