Note that two optimizations described in the paper, Param and SoleType, are already integrated as part of the open source Swift compiler: SoleType ( and Param ( Both the optimizations are enabled by default. However, the third optimization LocalVar is not yet been pushed to Swift open source repository.

We have two sets of experiments in the paper, one on open-source benchmarks (Sections 6.1 and Sections 6.2) and one on proprietary UBER code (Section 6.3). Unfortunately, we will not be able to share the UBER code. We have created a SampleApp (described below) that mimicks some of the functionalites of our app. Tables 4 and 5 of the paper can be reproduced using the Benchmark section below.

Build Instructions (From Source)

We have three different implementations:

1) swift-4.2-app-evaluation.tar.gz => This version of the Swift compiler (v4.2) was used to produce the results in Figure 5. 2) swift-master-oopsla-submission.tar.gz => This version of the Swift compiler (v5.0) with specific versions of the base code as (1) swift git sha 82c33dc0311a8874c333c8478d9c7251a21417ec, (2) LLVM 6ddb64316c, (3) Clang 8bf0fa1829, and (4) Swift b5aabd1747. This version works with Mac OS 10.14, which is when we made the OOPSLA submission. 3) swift-master-08052019.tar.gz => This version of the Swift compiler (v5.1) was downloaded on August 5th 2019. This version works with Mac OS 10.15, which we had to develop for the SampleApp. as requested by reviewers.

All the above three implementations contain our optimizations (SoleType, Param, and LocalVar). Newer version of Mac OS versions may choose to use 3) above. The git branch for our optimizations is "raj-dead-existential". It is easy to determine the code changes from master using "git diff master". Please use the instructions at to build the above implementations -- please make sure compatible versions of LLVM, Clang, LLDB, etc are downloaded before building.


Since Apple's toolchain is changing rapidly and build from source is very fragile, we provide binary version of the compiler with all our changes. Moreover, we require a Macintosh machine running Mac OS 10.14 or higher to be able to reproduce the results. The binary version is at binary.tar.gz.


Benchmarks are available in benchmarks.tar.gz.

Please set the SWIFTC and SDKROOT paths appropriately in and to collect data for Table-4 and Table-5, respectively.


This is a mini-version of the proprietary benchmark used in Section 6.3. It uses Swift Package manager. For this, we can not use the binary distribution. Once the compiler is built using "Build Instructions", execute the following instructions: 1) "cd SampleApp && cp Package.swift_unopt Package.swift && swift build -c release" -- The Unoptimized build will be in .build directory. 1) "cd SampleApp && cp Package.swift_opt Package.swift && swift build -c release" -- The Optimized build will be in .build directory.

The Unoptimized and Optimized versions should show a speedup of 12% or more on a 6-core MacBook Pro 2018.