Leveraging modern low-level: a Rust backend for PureScript

News #12:

And there you have it: Rust has finally caught up with C++: under the 10 ms barrier!

… or so I thought.

It turns out that was a phantom goal. Fatigue and all those late nights grinding on these backends led me to make a pretty crazy mistake with the units of measurement. In reality, the pscpp (C++) metrics are actually closer to a full second, making it about a factor of “only” 2x faster than Go (psgo). Given the fact that both psgo and pscpp come from the same work (purescript-native), this actually makes a lot more sense and is much more consistent with my empirical observations so far, which also show roughly a factor of 2 difference between Rust (purust) and Go (gopurs). (This also aligns with the initial intuition that TASTs are of great value because they provide all the necessary type information to AOT backends: pscpp is based on untyped ASTs.)

In short, my unit mistake at least motivated me to push hard. The good news is that it leaves us with a very positive takeaway for purust: it’s incredibly cool to have such a high-performance low-level backend. 100x faster than pscpp :slight_smile:

That being said, I’m going to take a break for a few days to catch up on some much-needed sleep and recharge my batteries.

CheerzZz… :zzz:

1 Like