diff options
| author | Stepan Koltsov <stepan.koltsov@gmail.com> | 2019-11-10 23:47:23 +0000 |
|---|---|---|
| committer | Stepan Koltsov <stepan.koltsov@gmail.com> | 2019-11-10 23:53:44 +0000 |
| commit | 04a237b9e2c327e1ad6339afd2f967bfcad38483 (patch) | |
| tree | 391475674b94604b630d8e11e693a9b1e2c057eb /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 3fc30d884ae0c988d98452a06737705cfe34806a (diff) | |
| download | rust-04a237b9e2c327e1ad6339afd2f967bfcad38483.tar.gz rust-04a237b9e2c327e1ad6339afd2f967bfcad38483.zip | |
Fix HashSet::union performance
Consider this example: small_set = 0..2, large_set = 0..1000. To efficiently compute the union of these sets, we should * take all elements of the larger set * for each element of the smaller set check it is not in the larger set This is exactly what this commit does. This particular optimization was implemented a year ago, but the author mistaken `<` and `>`.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
