salsa-rs / salsa

A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.
https://salsa-rs.netlify.app/
Apache License 2.0
2.09k stars 142 forks source link

Update `dashmap`, `hashlink`, and `rustc-hash` #514

Closed MichaReiser closed 1 month ago

MichaReiser commented 2 months ago

Update dashmap, hashlink and rustc-hash to the most recent major version.

dashmap

This release contains performance optimizations, most notably 10-40% gains on Apple Silicon but also 5-10% gains when measured in Intel Sapphire Rapids. This work was accomplished in:

It's a major because there's a slight API change.

hashlink

API incompatible change: Don't panic in reserve and try_reserve in cases where a rehash is needed. Previously would panic, adds the proper bounds on reserve methods to do a rehash (previously bounds were missing, and reserve would result in panics). (Thank you cuviper!)

I think that's fine

rustc-hash

Replace hash with faster and better finalized hash. This replaces the previous "fxhash" algorithm originating in Firefox with a custom hasher designed and implemented by Orson Peters (orlp). It was measured to have slightly better performance for rustc, has better theoretical properties and also includes a signficantly better string hasher.

netlify[bot] commented 2 months ago

Deploy Preview for salsa-rs canceled.

Name Link
Latest commit 151c48b40237f9ed12050f0057593a673709c830
Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/669e5c3fb1b339000827de92
davidbarsky commented 2 months ago

Using this commit against https://github.com/davidbarsky/salsa-benchmarks/, I saw an 11-12% improvement (418.66ns versus 466.92ns on compare/new_salsa_length/1).

nikomatsakis commented 1 month ago

Needs rebase but r=me

MichaReiser commented 1 month ago

@nikomatsakis done