Back to search

McGill University

Velocty: an optimizing static compiler for matlab and python

Abstract

dc:description.abstract

High-level scientific languages such as MATLAB and Python's NumPy library are gaining popularity among scientists and mathematicians. These languages provide many features such as dynamic typing, high-level scientific functions etc. which allow easy prototyping. However these features also inhibit performance of the code. We present VeloCty, an optimizing static compiler for MATLAB and Python as a solution to the problem of enhancing performance of programs written in these languages. In most programs, a large portion of the time is spent executing a small part of the code. Moreover, these sections can often be compiled ahead of time and improved performance can be achieved by optimizing only these `hot' sections of the code. VeloCty takes as input functions written in MATLAB and Python specified by the user and generates an equivalent C++ version. VeloCty also generates glue code to interface with MATLAB and Python. The generated code can then be compiled and packaged as a shared library that can be linked to any program written in MATLAB and Python. We also implemented optimisations to eliminate array bounds checks, reuse previously allocated memory during array operations and support parallel execution using OpenMP. VeloCty uses the Velociraptor toolkit. We implemented a C++ backend for the Velociraptor intermediate representation, VRIR, and language-specific runtimes for MATLAB and Python. We have also implemented a MATLAB VRIR generator using the \mclab toolkit. VeloCty was evaluated using 17 MATLAB benchmarks and 9 Python benchmarks. The MATLAB benchmark versions compiled using VeloCty with all optimisations enabled were between 1.3 to 458 times faster than the MathWorks' MATLAB2014b interpreter and JIT compiler. Similarly, Python benchmark versions were between 44.11 and 1681 times faster than the CPython interpreter.

Degree

thesis:*
Name thesis:degree_name
Master of Science
Grantor dc:publisher
McGill University
Year dc:date.issued
2015

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Jagdale, Sameer
Advisor dc:contributor.advisor
  • Hendren, Laurie (Internal/Supervisor)

Subjects

dc:subject × 1

Rights

dc:rights
Statement dc:rights
  • All items in eScholarship@McGill are protected by copyright with all rights reserved unless otherwise indicated.
Language dc:language.iso
en

Identifiers

dc:identifier.*
OCLC
922582487
Dc Identifier Other
hyrax:7w62fc216

Chain of custody

source
Harvested from
McGill University
Base URL
mcgill.scholaris.ca/server/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
related terms
citation

Jagdale, Sameer. Velocty: an optimizing static compiler for matlab and python. McGill University, 2015. https://doi.org/10.82308/6630