3 ms·
Clang doesn't know about the static code, so it can't do the optimizations this does. You could probably do the same thing with some hacky C++ code gen and tem
by foota 2y ago
Clang doesn't know about the static code, so it can't do the optimizations this does.
You could probably do the same thing with some hacky C++ code gen and templates, but I'm not sure clang et al would be able to optimize them.
- tekknolagi 2y agoIn the limit, that's called Copy and Patch!
- moonchild 2y agoIsn't copy and patch just jitter: new fangled kids' version?
- tekknolagi 2y agoAs far as I can tell from the jitter docs, no; the big thing about copy and patch is that you can piggy back on the existing C compiler and whatever backends it already supports.
- moonchild 2y ago> piggy back on the existing C compiler and whatever backends it already supports that is the whole point of jitter
- tekknolagi 2y agoDoes jitter compile C at run-time or just stitch it together? (EDIT: looks like stitch at run-time) The other thing C&P does is allow for a library of stencils and stitch them together intelligently depending on where arguments are coming from, where the return should go, where the flow of control should go next, etc EDIT: So I guess they look fairly similar, huh
- moonchild 2y agoyup, jitter does that too; e.g. https://ageinghacker.net/talks/jitter-slides--saiu--bts-2022--2022-03-06.pdf https://ageinghacker.net/talks/jitter-slides--saiu--bts-2022... page 23 and 35 fwiw i thought this was a stupid, hacky, pointless approach when it was called jitter and i still think it's a stupid, hacky, pointless approach when it's called copy-and-patch ;) but still like to see credit where it's due
- tekknolagi 2y agoI wonder if they're truly unaware of one another and developed in parallel or not. Hmmm