What is JITVM, what it is used for and what is its relation with
And also how is it different than EVM. Are they both same if not than what's the difference?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
It Enables de JIT Virtual Machine.
EVM is the Ethereum Virtual Machine, the default one.
The EVM’s internals are pretty simple; it has a single run loop which will attempt to execute the instruction at the current Program Counter (PC in short). Within this loop the Gas is calculated for each instruction, memory is expanded if necessary and executes the instruction if the preamble succeeds. This will continue on until the VM either finishes gracefully or returns with an error by throwing an exception (e.g. out-of-gas).
And In Case of JIT VM:
The JIT-EVM takes a different approach to running EVM byte-code and is by definition initially slower than the byte-code VM. Before the VM can run any code it must first compile the byte-code in to components that can be understood by the JIT VM.
The initialisation- and execution procedure is done in 3-steps:
We check whether there’s a JIT program ready to be run using the hash of the code — H(C) is used as an identifier to identify the program; if a program was found we run the program and return the result; if no program was found we run the byte-code and we compile a JIT program in the background.
--fast flag is for "fast syncing" by not processing the complete blockchain with every transaction since the beginning, but syncing by just downloading the transaction receipts along the blocks, creating a recent state database complete for this purpose.