Avatar for the salsa-rs user
salsa-rs
salsa
BlogDocsChangelog

Reduce memory usage by deduplicating type information

#649
Comparing
ChayimFriedman2:common-typeid-real
(
fd9cfb8
) with
master
(
7d417ac
)
CodSpeed Performance Gauge
-3%
Improvements
0
Regressions
0
Untouched
11
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

mutating[20]
benches/compare.rs::benches::mutating_inputs::Mutating Inputs::mutating[20]
CodSpeed Performance Gauge
-1%
16.3 µs
16.4 µs
mutating[30]
benches/compare.rs::benches::mutating_inputs::Mutating Inputs::mutating[30]
CodSpeed Performance Gauge
-1%
16.4 µs
16.5 µs
mutating[10]
benches/compare.rs::benches::mutating_inputs::Mutating Inputs::mutating[10]
CodSpeed Performance Gauge
-1%
16.1 µs
16.2 µs
accumulator
benches/accumulator.rs::benches::accumulator::accumulator
CodSpeed Performance Gauge
-1%
4.2 ms
4.2 ms
many_tracked_structs
benches/incremental.rs::benches::many_tracked_structs::many_tracked_structs
CodSpeed Performance Gauge
-2%
39.6 µs
40.2 µs
amortized[InternedInput]
benches/compare.rs::benches::inputs::Mutating Inputs::amortized[InternedInput]
CodSpeed Performance Gauge
-2%
4.1 µs
4.2 µs
amortized[Input]
benches/compare.rs::benches::inputs::Mutating Inputs::amortized[Input]
CodSpeed Performance Gauge
-4%
4.1 µs
4.3 µs
amortized[SupertypeInput]
benches/compare.rs::benches::inputs::Mutating Inputs::amortized[SupertypeInput]
CodSpeed Performance Gauge
-4%
4.9 µs
5.1 µs
new[InternedInput]
benches/compare.rs::benches::inputs::Mutating Inputs::new[InternedInput]
CodSpeed Performance Gauge
-4%
5.8 µs
6.1 µs
new[Input]
benches/compare.rs::benches::inputs::Mutating Inputs::new[Input]
CodSpeed Performance Gauge
-5%
11.9 µs
12.5 µs
new[SupertypeInput]
benches/compare.rs::benches::inputs::Mutating Inputs::new[SupertypeInput]
CodSpeed Performance Gauge
-5%
18 µs
19 µs

Commits

Click on a commit to change the comparison range
Base
master
7d417ac
-3%
Reduce memory usage by deduplicating type information We were storing the type information, 3 words wide, for each memo in each slot, while it is always constant wrt. the ingredient (different slots of the same ingredients will always have the same memos in the same order). This introduces some more unsafety, and the result wasn't as fast so I also had to use some lock-free structures, but the result is worth it: this shaves off 230mb from rust-analyzer with new Salsa.
fd9cfb8
2 months ago
by ChayimFriedman2
Home Terms PrivacyDocs