Introduction Flashcards
why so much focus on machine code?
programming instructions –> machine code
efficient machine code –> faster code
What are two major drawbacks of assembly language?
1) not easy to read/write
2) hardware-specific
What is the purpose of higher level language?
They overcome to two major drawbacks of assembly language.
What are compiler-based languages?
Compiler-based languages like FORTRAN, C, C++ allow easier reading/writing compared to assembly language and they convert machine code efficiently.
Compilers build machine code ahead-of-time (AOT).
How are interpreted lanugages (e.g.: Python) different from assembly and compiler-based?
They generate machine code immediately during program execution.
Instead of a compiler, they use an interpreter that translates each code line into machine code. Defining data types and defining memory allocation tasks can also be done to the interpreter.
Hence, such languages are flexible and interactive. However, interpreted languages require time to create proper machine code.
What does the JIT (just-in-time) compiler do?
It brings together the best of AOT and interpreter languages.
The programmer supplies as much information to the compiler for efficient machine code conversion. When some pieces of info are missing, the compiler tries to infer missing information based on usage.
Drawbacks of JIT?
Type inference fails or compiler has insufficient info that prevents optimization.
Who developed Julia?
Jeff Bezanson, Stefan Karpinski, Viral B Shah, and Alan Edelman