The optimization that wasn’t

Between mid-2015 and mid-2017, I spent a lot of time on performance measurement for the ParallelAccelerator package for Julia. I curated a collection of workloads of interest and tried to automate the process of benchmarking them as much as I could. Many of the workloads had originally been written in Matlab or Octave, and the Julia versions had been ported from those.

Participating in ICFP remotely

This year’s International Conference on Functional Programming, or ICFP ‘17 to its friends, will be getting under way in Oxford, UK in just a couple of days. ICFP is one of my favorite conferences, and this year I’m serving as the publicity chair and as a member of the program committee, so I have even more reasons than usual to want to take part in it. I also have a new baby, so intercontinental travel is rather difficult for me at the moment, and I won’t be going to Oxford. Yet, I’ll still be able to watch ICFP talks in real time, ask questions in Q&A sessions, and banter with other ICFP attendees. All this will be possible because this year we made some changes to enable remote participation at the conference.

My first fifteen compilers

In my last post, I wrote about a few ways that people use the word “transpiler”. In this post, I’ll offer a more personal take on the topic, based on my own experience of learning compiler development.

The first compiler I ever worked on was the one I wrote in the spring of 2009 for Kent Dybvig’s graduate compilers course at Indiana University. Actually, I didn’t write just one compiler for Kent’s course that semester; I wrote fifteen compilers, one for each week of the course. The first one had an input language that was more or less just parenthesized assembly language; its target language was x86-64 assembly. Each week, we added more passes to the front of the previous week’s compiler, resulting in a new compiler with the same target language as the compiler of the previous week, but a slightly higher-level input language.1 By the end of the course, I had a compiler that compiled a substantial subset of Scheme to x86-64, structured as forty small passes. Each pass translated from its input language to a slightly lower-level language, or had the same input and output language but performed some analysis or optimization on it.

What do people mean when they say “transpiler”?

A compiler is a computer program that takes a program as input, does some sort of transformation on it, and returns another program. Most of the time, we think of a compiler as something that translates code from a higher-level language (such as, for instance, Rust, Racket, or JavaScript) to a lower-level language (such as, for instance, LLVM IR or x86-64 assembly), but this doesn’t necessarily have to be the case.

Around 2013 or so, it started to become fashionable to use the word “transpiler” for certain kinds of compilers. When people say “transpiler”, what kind of compiler do they mean?