Performance of a Safe Compiled Language with Automatic Memory Management
Thesis title in Czech: | Výkonnost bezpečného kompilovaného jazyka s automatickou správou paměti |
---|---|
Thesis title in English: | Performance of a Safe Compiled Language with Automatic Memory Management |
Key words: | programming language |
English key words: | compilers|memory management|reference counting|garbage collecting|performance|type systems |
Academic year of topic announcement: | 2020/2021 |
Thesis type: | Bachelor's thesis |
Thesis language: | angličtina |
Department: | Department of Software and Computer Science Education (32-KSVI) |
Supervisor: | Adam Dingle, M.Sc. |
Author: | hidden - assigned and confirmed by the Study Dept. |
Date of registration: | 20.12.2020 |
Date of assignment: | 20.12.2020 |
Confirmed by Study dept. on: | 18.05.2021 |
Date and time of defence: | 02.07.2021 09:00 |
Date of electronic submission: | 27.05.2021 |
Date of submission of printed version: | 27.05.2021 |
Date of proceeded defence: | 02.07.2021 |
Opponents: | Mgr. Pavel Ježek, Ph.D. |
Guidelines |
The purpose of this thesis work is to investigate how closely a programming language with array bounds checking and automatic memory management can approach the performance of unsafe low-level languages such as C.
The student will write a compiler for a simple language whose types will include at least integers, booleans, dynamically allocated strings, and dynamically allocated arrays of any type. The language will include standard flow control constructs such as while and for loops. It will be statically type checked. The language will include compile-time and/or run-time checks that ensure that array accesses are in bounds, and will manage memory automatically via reference counting and/or another garbage collection algorithm. The student will use a series of benchmarks to compare the performance of his compiled language with C (as an example of an unsafe low-level language) and C# (as an example of a safer higher-level language). He will optimize his compiler so that if possible it outperforms C# on the benchmarks and approaches the performance of C as closely as possible. The particular optimizations that are necessary will be determined in the course of the thesis work, but might include (for example) compile-time elimination of bounds checks or of reference count updates, or optimizations that allocate data on the stack rather than the heap when possible. |
References |
Cooper, K. & Torczon, L. (2012). Engineering a Compiler, Second Edition. Morgan Kaufmann.
Grune, D. et al (2012). Modern Compiler Design, Second Edition. Springer. Joisha, P. (2006). Compiler optimizations for nondeferred reference-counting garbage collection. ISMM '06: Proceedings of the 5th international symposium on memory management, pp. 150-161. Jones, R. et al (2012). The Garbage Collection Handbook: The Art of Automatic Memory Management. CRC Press. Muchnick, S. (1997). Advanced Compiler Design and Implementation. Morgan Kaufmann. |