Optimizing Shell Scripting Languages

  • Berger E
N/ACitations
Citations of this article
1Readers
Mendeley users who have this article in their library.

Abstract

We present an optimizing compiler that dramatically improves the performance of shell script languages. Our prototype system, called Shark, performs a number of domainspecific optimizations. We show that, subject to some constraints, we can treat file I/O in shell languages like variables in regular programming languages. This insight allows us to leverage traditional compiler analyses to eliminate temporary files, transform file-based I/O to pipes, and extract coarse-grained parallelism. We show how we can further improve performance by eliminating process creation overhead, which can dominate the runtime of shell scripts. By modifying just a few lines of code, we can convert external commands like grep into dynamic libraries. Shark loads these libraries just once so that subsequent invocations execute with the speed of function calls, and then unloads them when they are no longer needed. We present results with our prototype demonstrating substantial speedups over the bash shell.

Cite

CITATION STYLE

APA

Berger, E. D. (2003). Optimizing Shell Scripting Languages. Techreport, (UMCS TR-2003-009). Retrieved from papers://2cd573f8-44b1-4938-8484-cf0e6dcd735b/Paper/p30

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free