about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/fingerprint.rs
AgeCommit message (Collapse)AuthorLines
2021-03-25Allow for reading raw bytes from rustc_serialize::Decoder without unsafe code.Michael Woerister-8/+28
2021-03-19Remove FingerprintEncoder/Decoder.Camille GILLOT-56/+10
2021-03-19Move raw bytes handling to Encoder/Decoder.Camille GILLOT-2/+2
2021-02-04Add documentation to Unhasher impl for Fingerprint.Michael Woerister-1/+12
2021-02-02Let a portion of DefPathHash uniquely identify the DefPath's crate.Michael Woerister-2/+13
This allows to directly map from a DefPathHash to the crate it originates from, without constructing side tables to do that mapping. It also allows to reliably and cheaply check for DefPathHash collisions.
2021-01-11Serialize incr comp structures to file via fixed-size bufferTyson Nottingham-10/+12
Reduce a large memory spike that happens during serialization by writing the incr comp structures to file by way of a fixed-size buffer, rather than an unbounded vector. Effort was made to keep the instruction count close to that of the previous implementation. However, buffered writing to a file inherently has more overhead than writing to a vector, because each write may result in a handleable error. To reduce this overhead, arrangements are made so that each LEB128-encoded integer can be written to the buffer with only one capacity and error check. Higher-level optimizations in which entire composite structures can be written with one capacity and error check are possible, but would require much more work. The performance is mostly on par with the previous implementation, with small to moderate instruction count regressions. The memory reduction is significant, however, so it seems like a worth-while trade-off.
2021-01-01rustc_serialize: have read_raw_bytes take MaybeUninit<u8> sliceTyson Nottingham-2/+2
2020-11-18Make PackedFingerprint's Fingerprint privateTyson Nottingham-1/+18
2020-11-18Use PackedFingerprint in DepNode to reduce memory consumptionTyson Nottingham-0/+42
2020-10-13Replace absolute paths with relative onesest31-2/+2
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-09-01Avoid rehashing Fingerprint as a map keyJosh Stone-1/+29
This introduces a no-op `Unhasher` for map keys that are already hash- like, for example `Fingerprint` and its wrapper `DefPathHash`. For these we can directly produce the `u64` hash for maps. The first use of this is `def_path_hash_to_def_id: Option<UnhashMap<DefPathHash, DefId>>`.
2020-08-30mv compiler to compiler/mark-0/+130