Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust-analyzer uses Salsa - incremental computation library that uses memoization.

https://github.com/rust-analyzer/rust-analyzer/blob/master/d...



Interesting choice to reply to matklad, one of rust-analyzer's primary authors, to explain how it works.


Nah, it’s a totally valid question: I indeed didn’t clarify where incrementality starts to happen.


I slapped myself in the face.


Yeah, to clarify, memoization happens after parsing. So for syntax highlighting we have a situation where from-scratch parsing is faster than incremental typechecking.


Thanks for explaining and making rust-analyzer!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: