Share

OpenURL

Abstract

Introduction FiSh is a new programming language for array computation that compiles higher-order polymorphic programs into simple imperative programs expressed in a sub-language Turbot, which can then be translated into, say, C. Initial tests show that the resulting code is extremely fast: two orders of magnitude faster than Haskell, and two to four times faster than Objective Caml, one of the fastest ML variants for array programming. Every functional program must ultimately be converted into imperative code, but the mechanism for this is often hidden. FiSh achieves this transparently, using the "equation" from which it is named: Functional = Imperative + Shape Shape here refers to the structure of data, e.g. the length of a vector, or the number of rows and columns of a matrix. The FiSh compiler reads the equation from left to right: it converts functions into procedures by using