Optimizing Generic Functions

نویسندگان

  • Artem Alimarine
  • Sjaak Smetsers
چکیده

Generic functions are defined by induction on the structural representation of types. As a consequence, by defining just a single generic operation, one acquires this operation over any particular type. An instance on a specific type is generated by interpretation of the type’s structure. A direct translation leads to extremely inefficient code that involves many conversions between types and their structural representations. In this paper we present an optimization technique based on compile-time symbolic evaluation. We prove that the optimization removes the overhead of the generated code for a considerable class of generic functions. The proof uses typing to identify intermediate data structures that should be eliminated. In essence, the output after optimization is similar to hand-written code.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Capturing Outlines of Planar Generic Images by Simultaneous Curve Fitting and Sub-division

In this paper, a new technique has been designed to capture the outline of 2D shapes using cubic B´ezier curves. The proposed technique avoids the traditional method of optimizing the global squared fitting error and emphasizes the local control of data points. A maximum error has been determined to preserve the absolute fitting error less than a criterion and it administers the process of curv...

متن کامل

Optimizing Control Variate Estimators for Rendering

We present the Optimizing Control Variate (OCV) estimator, a new estimator for Monte Carlo rendering. Based upon a deterministic sampling framework, OCV allows multiple importance sampling functions to be combined in one algorithm. Its optimizing nature addresses a major problem with control variate estimators for rendering: users supply a generic correlated function which is optimized for each...

متن کامل

Unified Approach to Thermodynamic Optimization of Generic Objective Functions in the Linear Response Regime

While many efforts have been devoted to optimizing the power output for a finite-time thermodynamic process, thermodynamic optimization under realistic situations is not necessarily concerned with power alone; rather, it may be of great relevance to optimize generic objective functions that are combinations of power, entropy production, and/or efficiency. One can optimize the objective function...

متن کامل

Using and comparing metaheuristic algorithms for optimizing bidding strategy viewpoint of profit maximization of generators

With the formation of the competitive electricity markets in the world, optimization of bidding strategies has become one of the main discussions in studies related to market designing. Market design is challenged by multiple objectives that need to be satisfied. The solution of those multi-objective problems is searched often over the combined strategy space, and thus requires the simultaneous...

متن کامل

Theta functions on covers of symplectic groups

We study the automorphic theta representation $Theta_{2n}^{(r)}$ on the $r$-fold cover of the symplectic group $Sp_{2n}$‎. ‎This representation is obtained from the residues of Eisenstein series on this group‎. ‎If $r$ is odd‎, ‎$nle r

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004