Leave the Features: Take the Cannoli

Programming languages like Python, JavaScript, and Ruby are becoming increasingly popular due to their dynamic capabilities. These languages are often much easier to learn than other, statically type checked, languages such as C++ or Rust. Unfortunately, these dynamic languages come at the cost of l...

Full description

Bibliographic Details
Main Author: Catanio, Jonathan Joseph
Format: Others
Published: DigitalCommons@CalPoly 2018
Subjects:
Online Access:https://digitalcommons.calpoly.edu/theses/1886
https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=3149&context=theses
id ndltd-CALPOLY-oai-digitalcommons.calpoly.edu-theses-3149
record_format oai_dc
spelling ndltd-CALPOLY-oai-digitalcommons.calpoly.edu-theses-31492021-08-31T05:02:10Z Leave the Features: Take the Cannoli Catanio, Jonathan Joseph Programming languages like Python, JavaScript, and Ruby are becoming increasingly popular due to their dynamic capabilities. These languages are often much easier to learn than other, statically type checked, languages such as C++ or Rust. Unfortunately, these dynamic languages come at the cost of losing compile-time optimizations. Python is arguably the most popular language for data scientists and researchers in the artificial intelligence and machine learning communities. As this research becomes increasingly popular, and the problems these researchers face become increasingly computationally expensive, questions are being raised about the performance of languages like Python. Language features found in Python, more specifically dynamic typing and run-time modification of object attributes, preclude common static analysis optimizations that often yield improved performance. This thesis attempts to quantify the cost of dynamic features in Python. Namely, the run-time modification of objects and scope as well as the dynamic type system. We introduce Cannoli, a Python 3.6.5 compiler that enforces restrictions on the language to enable opportunities for optimization. The Python code is compiled into an intermediate representation, Rust, which is further compiled and optimized by the Rust pipeline. We show that the analyzed features cause a significant reduction in performance and we quantify the cost of these features for language designers to consider. 2018-06-01T07:00:00Z text application/pdf https://digitalcommons.calpoly.edu/theses/1886 https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=3149&context=theses Master's Theses DigitalCommons@CalPoly compilers programming languages python rust optimizations Other Computer Engineering
collection NDLTD
format Others
sources NDLTD
topic compilers
programming languages
python
rust
optimizations
Other Computer Engineering
spellingShingle compilers
programming languages
python
rust
optimizations
Other Computer Engineering
Catanio, Jonathan Joseph
Leave the Features: Take the Cannoli
description Programming languages like Python, JavaScript, and Ruby are becoming increasingly popular due to their dynamic capabilities. These languages are often much easier to learn than other, statically type checked, languages such as C++ or Rust. Unfortunately, these dynamic languages come at the cost of losing compile-time optimizations. Python is arguably the most popular language for data scientists and researchers in the artificial intelligence and machine learning communities. As this research becomes increasingly popular, and the problems these researchers face become increasingly computationally expensive, questions are being raised about the performance of languages like Python. Language features found in Python, more specifically dynamic typing and run-time modification of object attributes, preclude common static analysis optimizations that often yield improved performance. This thesis attempts to quantify the cost of dynamic features in Python. Namely, the run-time modification of objects and scope as well as the dynamic type system. We introduce Cannoli, a Python 3.6.5 compiler that enforces restrictions on the language to enable opportunities for optimization. The Python code is compiled into an intermediate representation, Rust, which is further compiled and optimized by the Rust pipeline. We show that the analyzed features cause a significant reduction in performance and we quantify the cost of these features for language designers to consider.
author Catanio, Jonathan Joseph
author_facet Catanio, Jonathan Joseph
author_sort Catanio, Jonathan Joseph
title Leave the Features: Take the Cannoli
title_short Leave the Features: Take the Cannoli
title_full Leave the Features: Take the Cannoli
title_fullStr Leave the Features: Take the Cannoli
title_full_unstemmed Leave the Features: Take the Cannoli
title_sort leave the features: take the cannoli
publisher DigitalCommons@CalPoly
publishDate 2018
url https://digitalcommons.calpoly.edu/theses/1886
https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=3149&context=theses
work_keys_str_mv AT cataniojonathanjoseph leavethefeaturestakethecannoli
_version_ 1719473037875609600