Below is an excerpt from Wikipedia text on interpreters, specifically the section on template interpreter. The answer to my question is technically there, in bold. But I still do not quite understand the difference, probably because I have very low-level knowledge of low-level processes, pun intended (sorry).
It is saying that the JIT compiler creates sequences of CPU-executable instructions from the entire code segment. What do they mean by "from the entire code segment"? To me, this sounds like a normal compiler. I thought JIT compilation meant that an interpretor is run (parsing and executing statement-by-statement) and then repeated instructions are kept track of and translated into native machine code to be used next time it is needed, like a compiler does. But this sounds like the template interpreter to me, which I interpret as translating often-appearing statements and saving the statements and respective translations as key-value mappings in an array. So wherein lies the difference? Is it how the JIT saves the native machine instructions compiled from bytecode-sections (i.e. not in an array with mappings, then if so how is it saved)? Is it the way that the blocks of bytecode that are compiled into native machine code are partitioned; i.e. that they are translated and saved as mappings by opcode (if i understood this correctly) vs by something else? etc
"Making the distinction between compilers and interpreters yet again even more vague is a special interpreter design known as a template interpreter. Rather than implement the execution of code by virtue of a large switch statement containing every possible bytecode, while operating on a software stack or a tree walk, a template interpreter maintains a large array of bytecode (or any efficient intermediate representation) mapped directly to corresponding native machine instructions that can be executed on the host hardware as key value pairs,[15][16] known as a "Template". When the particular code segment is executed the interpreter simply loads the opcode mapping in the template and directly runs it on the hardware.[17][18] Due to its design, the template interpreter very strongly resembles a just-in-time compiler rather than a traditional interpreter, however it is technically not a JIT due to the fact that it merely translates code from the language into native calls one opcode at a time rather than creating optimized sequences of CPU executable instructions from the entire code segment. Due to the interpreter's simple design of simply passing calls directly to the hardware rather than implementing them directly, it is much faster than every other type, even bytecode interpreters, and to an extent less prone to bugs, but as a tradeoff is more difficult to maintain due to the interpreter having to support translation to multiple different architectures instead of a platform independent virtual machine/stack. To date, the only template interpreter implementation of a language to exist is the interpreter within the HotSpot/OpenJDK Java Virtual Machine reference implementation.[15]"