What's this? An abstract syntax tree? A bytecode? What does that even mean anymore?
Next Wednesday, @OctaveLarose is going to explore those questions in his ICOOOLPS presentation.
Our draft paper is online already: https://t.co/paNnpZeGpx
#interpreter#design#tradeoffs
@Troyhinckley@MMTkGC Yeah, pretty much. Most of the wins were from cheaper allocations on a self-managed heap and not the GC itself, but we ofc need the GC to ensure using that heap is correct so that goes hand in hand. Plus optimisations but only some are specific to our new heap yeah...
@Troyhinckley@MMTkGC (and about these results - disregard that beautiful 562182% slowdown on a benchmark that previously had 0 seconds of execution time. That was a fun bug)
@Troyhinckley@MMTkGC I appreciate it, Troy! The best I've got to compare the original version and the GC one is this (which is how I got that first graph in the blog post) https://t.co/rLrSqp14rQ
But like I mention, that includes other changes that aren't because of GC but random optimisations
@GuiEspada So basically if your unsafe changes are completely self contained it's fine, but if they can cause weird issues through UB anywhere elsewhere in my codebase, it's bad practice?
Had been a little while since my last post about our Rust interpreters, but I'm back to show the world that I'm relying on the unsafe keyword more now. I'm not quite sure how evil I am, let me know https://t.co/znLIcZ8Pac
@GuiEspada Oh yeah I've heard of miri! Never did use it though, not sure I have a use for it yet. My understanding is that I should wait for a bad crash that has me confused as hell and then actually put in the effort to learn
@GuiEspada Yeah the absence of numbers is weird to me, surely they could at least show some basic experiments. Since AFAIK branch predictors are getting so good that you can lose the benefits of threaded interpreters easily, since their main appeal is to speed up bytecode dispatch
@Troyhinckley Ah, you're talking about the self-replacement bit! I believe std::mem::take could solve those kinds of issues in the future, I edited the article after talking more with @irevoire. The old one is dropped, you can recursively enter a node, and the types aren't copy (atm) FYI
Wrote a thing about implementing inline caching in our Rust-based AST interpreter. If anyone knows how to make Rust play more nicely with self-modifying tree structures, do let me know https://t.co/Cvqe6XMBiR
@Troyhinckley Raw pointers. The reason I was sparse with detail is because the implementation is pretty ugly... it's in fact not even raw pointers, but usize. The Message enum is defined in AST+BC code and I didn't want to have it depend on AST-specific code (e.g. "*mut AstClass")
@irevoire OK, so the behavior that I want is only available if my Message has the Default trait? If so I don't understand why I need to do that. Will contact you in private if that's OK (so that we can also switch to speaking the superior language)
@smarr@tekknolagi What Stefan said. Related pitfall though is that if you *did* modify e.g. whileTrue: to do wacky stuff like I mention in the article, we don't detect that and we do inlining/lowering at compile time anyway, which is invalid. Not really an issue in practice, but still.
I'm pushing the performance of our Rust-based SOM interpreters, and I wrote a quick blog post about an optimization I recently implemented. Gonna try to make this more of a regular thing for extra motivation (and hopefully valuable feedback) https://t.co/hHyaB3PGtB
@eregontp Also, I forgot to actually link my code in the article, gah: https://t.co/GcyLzRLICd ...not that it makes a major difference with the example you gave. And putting that match into its own function might be a great idea! Thanks for that, I'll give it a try soon and get back to you
@eregontp I don't expect it to be a performance thing since as you say, you create and remove method frames anyway which takes a very solid chunk of the runtime (I had numbers at some point)