alan
alan copied to clipboard
Write RFC for JIT support in the runtime and compiler
Turn @dfellis' idea into an RFC. We want to group opcodes types together as much as possible and do JIT support for contiguous chains of cpu!
opcodes.
If we can reorder the graph such that io!, cpu! and unpred_cpu! opcodes get grouped together in the runtime as contiguously as possible, then we can take those chunks, do the io in parallel (you have already done this), pass the cpu! opcodes to a JIT that generates first x86-64 and later arm64 binary data and executes it (there ought to be some sort of example of doing this in Rust that we can take a look at), and then takes the output of one unpred_cpu! to feed into the next when they're connected in that way to reduce the latency and also the intermediate memory usage if we can prove that the intermediate variable is never used by anything else