Senior Thesis 2024
Computer Science Department
School of Computer Science, Carnegie Mellon University



Algebraic Data Type Representation in Virgil

Bradley Teo

Senior Thesis

May 2024

Thesis Document


Algebraic Data Types (ADTs) are an increasingly common feature in modern programming languages. We explore various optimizations to ADT representations in Virgil, a systems-level programming language that compiles to x86, x86-64, Wasm and the Java Virtual Machine. In Virgil, programmers can now annotate ADTs as unboxed to eliminate the overhead of heap allocation, and we have extended the language to enable programmer-expressed bit-layouts for varying levels of control on memory layout. The performance impact of these representation changes was evaluated on a variety of workloads in terms of execution time and memory usage.

18 pages

Advisor
Ben Titzer


Return to: SCS Technical Report Collection
School of Computer Science

This page maintained by reports@cs.cmu.edu