about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2023-03-02 13:21:35 +0100
committerSamuel Tardieu <sam@rfc1149.net>2023-03-04 17:29:58 +0100
commit446ae429a6e30b416853d6ae0dea228b751671b0 (patch)
treeb2abfe3de92c983d76509292c02cc6cc45691436 /tests/codegen/src-hash-algorithm
parent113c704d225c63c1a0eec29cfa9478b7537e7d73 (diff)
downloadrust-446ae429a6e30b416853d6ae0dea228b751671b0.tar.gz
rust-446ae429a6e30b416853d6ae0dea228b751671b0.zip
lintcheck: fix parallel processing handling
Using `rayon::current_num_threads()` causes a bug:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
  ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }',
  src/main.rs:632:10
```

Moreover, using the number of threads and dividing it by 2 wouldn't
return the number of physical threads on modern processors which have
a varying number of threads per core.

It makes little sense to restrict ourselves to physical threads,
especially when, in modern architectures, cores with multiple threads
are often faster (performance) while cores with a unique threads are
often slower (efficient). The Rust runtime will make a better choice.
Diffstat (limited to 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions