7 comments

[ 4.5 ms ] story [ 24.4 ms ] thread
> There is a demand for these, even though they become very expensive toys fast.

'EuroCrack' is the term I've heard bandied about ;)

> You can’t really fit an mp3 file in an executable that small and expect for it to sound any good,

Very cool synthesizer, wondering what platform you were on where MP3 decoding comes for free in your 64k demos.

That's great! This sounds like a path into Rust for me.
Thanks for replying, I'd definitely be interested in more architectural details.

3ms to complete codegen is orders of magnitude faster than I expected. Does that include everything necessary from making the change through actually synthesizing samples?

I'll look at writing that blog post soon then :)

Just did some proper testing on a reasonably complex project, looks like I was about an order of magnitude off (to be fair it was 2AM here at the time, and I wasn't reading the numbers right haha). 30-40ms is still fast enough that you don't notice for the most part though. For this specific project, it breaks down roughly like this:

- ~1ms to build the new MIR based on the editor state

- ~5ms to process/run passes on the MIR (this involves some funky graph traversal which could very likely be optimized a lot)

- ~12ms to generate LLVM IR

- ~14ms in the LLVM JIT

In a project that makes good use of groups (nodes that contain a surface inside and then expose some controls back out) I'd expect this to be lower, since we only need to perform those operations on the surfaces that change.

Hm, 12ms for the IR is longer than I would expect for such a translation step. Do you know whwre this time is being spent?
Just had a look, and it turns out that's including running LLVM's optimizer as well, which takes roughly half the time. It's basically doing the equivalent of -O2 currently. That's probably more aggressive than what's needed, but I haven't taken the time to fine-tune it yet.

Other than that, you're right that it might be a bit high. There's very likely parts of the lowering code which can be optimized, I just haven't had the need to yet.