This will most likely be the fastest brainfuck runner in assembly that a student will ever hand in. This may sound over-confident, but I am certain that it is almost impossible to optimize brainfuck even more without implementing special cases for common constructs. I encourage you to read the code (and the accompanying comments). Although it is over 1000 lines of assembly, the comments give a lot of the information also outlined in this document.
Flash is an optimizing JIT compiler. JIT, or Just-In-Time, refers to the technique where the code to be ran is translated into machine instructions on the fly, which are then written to an executable block of memory and directly interpreted by the CPU. This is similar to how normal compilers work, but instead of writing the resulting instructions to an executable they are written and executed directly.
Flash goes through the following steps, in order:
- Construct And Optimize Code
- Build IR