4 ms·
My issue is that Mathematica is essentially a term rewriting system. Reimplementing everything in Rust seems to go against the idea. The derivative computation
by bonzini 4mo ago
My issue is that Mathematica is essentially a term rewriting system. Reimplementing everything in Rust seems to go against the idea. The derivative computation is 400 lines of Rust and could be 20 lines of Mathematica code.
- srean 4mo agoI have not looked at the implementation but isn't the idea to write a Lispy language in Rust (in other words, Mathematica the language) and then write the differentiation and other routines in that.
- Archit3ch 4mo agoThey had to patch the Rust compiler to natively support AutoDiff. Contrast with Julia where it can be a regular Julia library,
- throwsalj2rttw 4mo agoI mean you can do autodiff with a regular library in Rust. Enzyme is just a very specific type of autodiff which transforms after some compilation has taken place. I don't know that you can match something speedwise like a JIT or Expression Templates in rust though without using something like Enzyme.
- bonzini 4mo agoNo, they're implementing all functions, all matching etc. in Rust.
- adius 4mo agoMy theory is that writing as much as possible in Rust will improve performance and produce higher-quality code due to Rust's static typing. So far, it's been working well, but the final verdict is still out.