Reducing Compilation Latency in the Julia Programming Language
The Julia programming language is a high performance computing language that employs an LLVM-based just-in-time compiler and an LLVM-based ahead-of-time compiler to produce optimized machine code. When Julia uses its just-in-time compiler, compilation of methods must be done before methods can begin...
Main Author: | |
---|---|
Other Authors: | |
Format: | Thesis |
Published: |
Massachusetts Institute of Technology
2023
|
Online Access: | https://hdl.handle.net/1721.1/151537 |
_version_ | 1826209108754169856 |
---|---|
author | Chintalapudi, Prem |
author2 | Edelman, Alan |
author_facet | Edelman, Alan Chintalapudi, Prem |
author_sort | Chintalapudi, Prem |
collection | MIT |
description | The Julia programming language is a high performance computing language that employs an LLVM-based just-in-time compiler and an LLVM-based ahead-of-time compiler to produce optimized machine code. When Julia uses its just-in-time compiler, compilation of methods must be done before methods can begin execution, which presents as a delay the first time a function is executed. When Julia compiles code ahead of time into code images, a large fraction of time is spent optimizing and emitting machine code for large numbers of functions. Here, we investigate ways of exposing opportunities for parallelism to both compilers, as well as investigate ways to perform less work during the compilation process using newer LLVM technologies. Our results show that we can achieve speedups of 8-16X in the ahead-of-time compiler when compiling on multiple threads, while the just-in-time compiler can achieve speedups between 1.5-3X under certain circumstances. Additionally, we find that LLVM’s new CompileOnDemandLayer for delaying compilation until code is executed can avoid 30-40% of compilation work in certain applications, while LLVM’s new pass manager framework can reduce optimization time by up to 17.5% compared to the legacy pass manager. Incorporation of these compiler improvements into the Julia language yields marked decreases in the initial delays that are observed by users today. |
first_indexed | 2024-09-23T14:17:42Z |
format | Thesis |
id | mit-1721.1/151537 |
institution | Massachusetts Institute of Technology |
last_indexed | 2024-09-23T14:17:42Z |
publishDate | 2023 |
publisher | Massachusetts Institute of Technology |
record_format | dspace |
spelling | mit-1721.1/1515372023-08-01T03:24:36Z Reducing Compilation Latency in the Julia Programming Language Chintalapudi, Prem Edelman, Alan Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science The Julia programming language is a high performance computing language that employs an LLVM-based just-in-time compiler and an LLVM-based ahead-of-time compiler to produce optimized machine code. When Julia uses its just-in-time compiler, compilation of methods must be done before methods can begin execution, which presents as a delay the first time a function is executed. When Julia compiles code ahead of time into code images, a large fraction of time is spent optimizing and emitting machine code for large numbers of functions. Here, we investigate ways of exposing opportunities for parallelism to both compilers, as well as investigate ways to perform less work during the compilation process using newer LLVM technologies. Our results show that we can achieve speedups of 8-16X in the ahead-of-time compiler when compiling on multiple threads, while the just-in-time compiler can achieve speedups between 1.5-3X under certain circumstances. Additionally, we find that LLVM’s new CompileOnDemandLayer for delaying compilation until code is executed can avoid 30-40% of compilation work in certain applications, while LLVM’s new pass manager framework can reduce optimization time by up to 17.5% compared to the legacy pass manager. Incorporation of these compiler improvements into the Julia language yields marked decreases in the initial delays that are observed by users today. M.Eng. 2023-07-31T19:47:04Z 2023-07-31T19:47:04Z 2023-06 2023-06-06T16:35:40.423Z Thesis https://hdl.handle.net/1721.1/151537 In Copyright - Educational Use Permitted Copyright retained by author(s) https://rightsstatements.org/page/InC-EDU/1.0/ application/pdf Massachusetts Institute of Technology |
spellingShingle | Chintalapudi, Prem Reducing Compilation Latency in the Julia Programming Language |
title | Reducing Compilation Latency in the Julia
Programming Language |
title_full | Reducing Compilation Latency in the Julia
Programming Language |
title_fullStr | Reducing Compilation Latency in the Julia
Programming Language |
title_full_unstemmed | Reducing Compilation Latency in the Julia
Programming Language |
title_short | Reducing Compilation Latency in the Julia
Programming Language |
title_sort | reducing compilation latency in the julia programming language |
url | https://hdl.handle.net/1721.1/151537 |
work_keys_str_mv | AT chintalapudiprem reducingcompilationlatencyinthejuliaprogramminglanguage |