4학년 1학기 전공/컴파일러
[컴파일러] Chapter 1. Introduction
시데브
2025. 3. 18. 11:13
경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다.
What is a Compiler?
- compiler: source language로 작성된 프로그램을 기능적으로 동등한 target language로 작성된 프로그램으로 번역하는 프로그램
- compiler may support source- and target- independent compilation
- compiler can also optimize program to enhance
- performance
- programmability
- security
Compiler vs Interpreter
- Interpreter: execution + translation을 sequence 단위로 동시에 수행
- 파이썬 사용 시에 최대 성능이 제한됨
- 컴파일된 프로그램은 hardware에서 직접적으로 실행 가능
- gcc -o test.exe test.c -> test.c를 hardware에서 즉시 실행 가능한 test.exe로 변환
- 이후 ./test.exe 명령어로 즉시 실행 가능
- interpreted 프로그램은 corresponding interpreter 필요
- python test.py로 즉시 실행
Typical Compilation Process
참고자료
- Appel, Andrew W. 저자(글), Cambridge University Press · 2004년 07월 08일
728x90
반응형