rust/library
bors a0035916e0 Auto merge of #83093 - the8472:smaller-instant-hammer, r=Amanieu
where available use AtomicU{64,128} instead of mutex for Instant backsliding protection

This decreases the overhead of backsliding protection on x86 systems with unreliable TSC, e.g. windows. And on aarch64 systems where 128bit atomics are available.

The following benchmarks were taken on x86_64 linux though by overriding `actually_monotonic()`, the numbers may look different on other platforms

```
# actually_monotonic() == true
test time::tests::instant_contention_01_threads                   ... bench:          44 ns/iter (+/- 0)
test time::tests::instant_contention_02_threads                   ... bench:          44 ns/iter (+/- 0)
test time::tests::instant_contention_04_threads                   ... bench:          44 ns/iter (+/- 0)
test time::tests::instant_contention_08_threads                   ... bench:          44 ns/iter (+/- 0)
test time::tests::instant_contention_16_threads                   ... bench:          44 ns/iter (+/- 0)

# 1x AtomicU64
test time::tests::instant_contention_01_threads                   ... bench:          65 ns/iter (+/- 0)
test time::tests::instant_contention_02_threads                   ... bench:         157 ns/iter (+/- 20)
test time::tests::instant_contention_04_threads                   ... bench:         281 ns/iter (+/- 53)
test time::tests::instant_contention_08_threads                   ... bench:         555 ns/iter (+/- 77)
test time::tests::instant_contention_16_threads                   ... bench:         883 ns/iter (+/- 107)

# mutex
test time::tests::instant_contention_01_threads                   ... bench:          60 ns/iter (+/- 2)
test time::tests::instant_contention_02_threads                   ... bench:         770 ns/iter (+/- 231)
test time::tests::instant_contention_04_threads                   ... bench:       1,347 ns/iter (+/- 45)
test time::tests::instant_contention_08_threads                   ... bench:       2,693 ns/iter (+/- 114)
test time::tests::instant_contention_16_threads                   ... bench:       5,244 ns/iter (+/- 487)
```

Since I don't have an arm machine with 128bit atomics I wasn't able to benchmark the AtomicU128 implementation.
2021-08-20 19:06:46 +00:00
..
alloc Constified Default implementations 2021-08-17 07:15:54 +00:00
backtrace@4f925f8d81 Update the backtrace crate in libstd 2021-08-19 07:31:49 -07:00
core Rollup merge of #88031 - ibraheemdev:build-hasher-object-safe, r=m-ou-se 2021-08-18 19:54:57 +02:00
panic_abort Use C-unwind ABI for __rust_start_panic in panic_abort 2021-08-05 18:01:17 +08:00
panic_unwind STD support for the ESP-IDF framework 2021-08-10 12:09:00 +03:00
proc_macro Change proc_macro::Diagnostics docs 2021-08-07 23:54:34 +10:00
profiler_builtins rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rtstartup
rustc-std-workspace-alloc rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc-std-workspace-core rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc-std-workspace-std rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
std Auto merge of #83093 - the8472:smaller-instant-hammer, r=Amanieu 2021-08-20 19:06:46 +00:00
stdarch@c158cfd38e Update stdarch to deprecate crypto aarch64 target_feature 2021-08-03 12:07:56 +00:00
test rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
unwind STD support for the ESP-IDF framework 2021-08-10 12:09:00 +03:00