Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of std::oldmap (migrate to core::hashmap) #4986

Closed
thestinger opened this issue Feb 17, 2013 · 2 comments
Closed

get rid of std::oldmap (migrate to core::hashmap) #4986

thestinger opened this issue Feb 17, 2013 · 2 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@thestinger
Copy link
Contributor

This is at least 30% slower than core::hashmap, not sendable, and it doesn't use explicit self or expose the underlying mutability through the API (relies on mut fields). It also results in a lot of code bloat and is probably responsible for slowing down the compiler by a significant amount.

@Thiez
Copy link
Contributor

Thiez commented Feb 17, 2013

I actually have a version of librustc/libsyntax with all the oldmaps replaced by LinearMap/LinearSet, but it is blocked by what appears to be a bug in the codegen of the original compiler. When type 'map' in libsyntax/ast_map.rs is a "@ mut LinearMap" libsyntax will happily compile (assuming you make the appropriate changes in libsyntax and librustc), but when compiling the new librustc the compiler will ICE (in add_root_cleanup from librustc/middle/trans/base.rs). Sadly I have not yet managed to find the exact cause of this bug.

@nikomatsakis
Copy link
Contributor

I have some suspicions as to the cause of this bug. It's related I'm sure to #3511, #3850, and the general refactoring needed about cleanups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

4 participants