about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2019-11-12 16:36:15 +0900
committerGitHub <noreply@github.com>2019-11-12 16:36:15 +0900
commit6bdd1beca6d310f0baaffa0835a16a968061ccfb (patch)
tree01acb6acf43db5c6b1c84b7713518a1e924f3b7b /src/libstd/sys/unix/stack_overflow.rs
parent8e0265c268c06a23f9107a1b28ca1dedf7c59fe7 (diff)
parent04a237b9e2c327e1ad6339afd2f967bfcad38483 (diff)
downloadrust-6bdd1beca6d310f0baaffa0835a16a968061ccfb.tar.gz
rust-6bdd1beca6d310f0baaffa0835a16a968061ccfb.zip
Rollup merge of #66280 - stepancheg:union, r=alexcrichton
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