-
Notifications
You must be signed in to change notification settings - Fork 394
Closed
Description
On my machine, with a silly for _ in 0..100_000 {}
, the isolated clock already runs at about half the speed of the actual clock. That's probably somewhat tolerable, but rust-lang/rust#122420 is going to push us farther away from reality.
We might want to re-calibrate this magic value:
Lines 4 to 9 in b228407
/// When using a virtual clock, this defines how many nanoseconds we pretend are passing for each | |
/// basic block. | |
/// This number is pretty random, but it has been shown to approximately cause | |
/// some sample programs to run within an order of magnitude of real time on desktop CPUs. | |
/// (See `tests/pass/shims/time-with-isolation*.rs`.) | |
const NANOSECONDS_PER_BASIC_BLOCK: u64 = 5000; |
Or if our goal is really just an order of magnitude, we should make the test failure a lot more clear so reviewers/contributors are less confused by it.
Metadata
Metadata
Assignees
Labels
No labels