In my interpreter, code like the following
x=(y+4)*z
echo x
parses and "optimizes" down to four single operations performed by the interpreter, pretty much assembly-like:
add 4 to y
multiply <last operation result> with z
set x to <last operation result>
echo x
In modern interpreters (for example: CPython, Ruby, PHP), how simplified are the "opcodes" for which are in end-effect run by the interpreter?
Could I achieve better performance when trying to keep the structures and commands for the interpreter more complex and high-level? That would be surely a lot harder, or?