about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2024-03-09 10:15:57 -0700
committerMichael Howell <michael@notriddle.com>2024-03-09 10:56:21 -0700
commitbcc3f193b87ee9f843be68c138af830d75ccb1dd (patch)
tree415f4b40d0280757b347799c43e84b5f76522210 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentb054da815501bafb24a08284151d32862f7a3a13 (diff)
downloadrust-bcc3f193b87ee9f843be68c138af830d75ccb1dd.tar.gz
rust-bcc3f193b87ee9f843be68c138af830d75ccb1dd.zip
rustdoc-search: depth limit `T<U>` -> `U` unboxing
Profiler output:
https://notriddle.com/rustdoc-html-demo-9/search-unbox-limit/

This is a performance enhancement aimed at a problem I found while
using type-driven search on the Rust compiler. It is caused by
[`Interner`], a trait with 41 associated types, many of which
recurse back to `Self` again.

This caused search.js to struggle. It eventually terminates,
after about 10 minutes of turning my PC into a space header, but it's
doing `41!` unifications and that's too slow.

[`Interner`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.Interner.html
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions