rust/library/std/src
AngelicosPhosphoros de97d7393f Add complexity estimation of iterating over HashSet and HashMap
It is not obvious (at least for me) that complexity of iteration over hash tables depends on capacity and not length. Especially comparing with other containers like Vec or String. I think, this behaviour is worth mentioning.

I run benchmark which tests iteration time for maps with length 50 and different capacities and get this results:
```
capacity - time
64       - 203.87 ns
256      - 351.78 ns
1024     - 607.87 ns
4096     - 965.82 ns
16384    - 3.1188 us
```

If you want to dig why it behaves such way, you can look current implementation in [hashbrown code](f3a9f211d0/src/raw/mod.rs (L1933)).

Benchmarks code would be presented in PR related to this commit.
2022-05-20 18:46:24 +03:00
..
backtrace Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
collections Add complexity estimation of iterating over HashSet and HashMap 2022-05-20 18:46:24 +03:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
f32 Implement IEEE 754-2019 minimun and maximum functions for f32/f64 2021-11-20 10:14:03 +01:00
f64 Remove fNN::lerp - consensus unlikely 2021-10-25 22:44:41 -05:00
ffi Rollup merge of #96861 - m-ou-se:std-use-prelude-2021, r=joshtriplett 2022-05-11 00:09:34 +09:00
fs Use gender neutral terms 2022-04-07 08:51:59 +01:00
io Use Rust 2021 prelude in std itself. 2022-05-09 11:12:32 +02:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
net Use Rust 2021 prelude in std itself. 2022-05-09 11:12:32 +02:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Revert "Auto merge of #96441 - ChrisDenton:sync-pipes, r=m-ou-se" 2022-05-17 18:46:11 -04:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path Allow unused_macro_rules in path tests 2022-05-16 08:55:05 +02:00
prelude Rollup merge of #94461 - jhpratt:2024-edition, r=pnkfelix 2022-04-15 20:50:43 +02:00
process Add test for issue #95178 2022-03-23 05:33:44 +00:00
sync Auto merge of #96422 - tmccombs:mutex-unpoison, r=m-ou-se 2022-05-20 08:06:56 +00:00
sys Rollup merge of #97127 - Mark-Simulacrum:revert-96441, r=m-ou-se 2022-05-19 08:22:43 +09:00
sys_common Use Rust 2021 prelude in std itself. 2022-05-09 11:12:32 +02:00
thread Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
time Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
alloc.rs update jemallocator example to use 2018 edition import syntax 2022-05-04 13:43:33 +02:00
ascii.rs Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
backtrace.rs revert changes that cast functions to raw pointers, portability hazard 2022-03-29 20:18:27 -04:00
env.rs Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
error.rs Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
f32.rs Rollup merge of #95483 - golddranks:improve_float_docs, r=joshtriplett 2022-05-09 18:45:35 +02:00
f64.rs Rollup merge of #95483 - golddranks:improve_float_docs, r=joshtriplett 2022-05-09 18:45:35 +02:00
fs.rs Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
keyword_docs.rs Rollup merge of #93692 - mfrw:mfrw/document-keyword-in, r=dtolnay 2022-03-19 02:02:02 +01:00
lazy.rs Add #[must_use] to core and std constructors 2021-10-10 02:44:26 -04:00
lib.rs Rollup merge of #96861 - m-ou-se:std-use-prelude-2021, r=joshtriplett 2022-05-11 00:09:34 +09:00
macros.rs Update macros.rs 2022-05-18 07:31:58 +05:30
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Configure panic hook backtrace behavior 2022-02-02 13:46:42 -05:00
panicking.rs Use Rust ABI for __rust_start_panic and _{rdl,rg}_oom 2022-05-14 02:53:59 +01:00
path.rs fix panic in Path::strip_prefix 2022-05-08 22:15:26 +08:00
primitive_docs.rs match std f32 primitive docs to core f32 primitive docs 2022-03-31 18:50:14 +09:00
process.rs Remove unnecessay .report() on ExitCode 2022-05-19 11:47:36 +02:00
rt.rs Change Termination::report return type to ExitCode 2022-01-28 12:53:36 -08:00
time.rs Link to std::io's platform-specific behavior disclaimer 2022-03-27 21:01:28 -07:00