Notice
Recent Posts
Recent Comments
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Archives
Today
Total
관리 메뉴

SYDev

[컴파일러] Chapter 1. Introduction 본문

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

https://www.phoronix.com/review/gcc11-rocket-opts/4

 

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로 즉시 실행

 

https://medium.com/@astermanuelg/blurred-lines-is-ruby-an-interpreted-language-2d3d6bca3d37

 

Typical Compilation Process


참고자료