goldsluice.profile¶
Time an algorithm on both backends: print(compare("peak", traces, glitch_samples=10, ...)).
Functions
|
Best-of- |
Classes
|
- class goldsluice.profile.Timing(name: str, n_events: int, n_samples: int, rust_s: float, python_s: float, python_events: int)[source]¶
Bases:
object- Parameters:
- property speedup¶
- goldsluice.profile.compare(name, traces, *, repeat=5, python_events=200, **params)[source]¶
Best-of-
repeatwall time of the Rust kernel over all traces, and of the Python mirror over the firstpython_events(it is slow), scaled up. The Rust time includes the call, the contiguity check and the output arrays, not the first-call import.