Introduction Flashcards

1
Q

why so much focus on machine code?

A

programming instructions –> machine code

efficient machine code –> faster code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are two major drawbacks of assembly language?

A

1) not easy to read/write

2) hardware-specific

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of higher level language?

A

They overcome to two major drawbacks of assembly language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are compiler-based languages?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are interpreted lanugages (e.g.: Python) different from assembly and compiler-based?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the JIT (just-in-time) compiler do?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Drawbacks of JIT?

A

Type inference fails or compiler has insufficient info that prevents optimization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Who developed Julia?

A

Jeff Bezanson, Stefan Karpinski, Viral B Shah, and Alan Edelman

How well did you know this?
1
Not at all
2
3
4
5
Perfectly