Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2014 Feb 12.
Published in final edited form as: Sci Program. 2011 Dec 5;19(4):213–229. doi: 10.3233/SPR-2011-0329

Tool support for software lookup table optimization

Chris Wilcox 1,✉, Michelle Mills Strout 1, James M Bieman 1
PMCID: PMC3922221  NIHMSID: NIHMS383062  PMID: 24532963

Abstract

A number of scientific applications are performance-limited by expressions that repeatedly call costly elementary functions. Lookup table (LUT) optimization accelerates the evaluation of such functions by reusing previously computed results. LUT methods can speed up applications that tolerate an approximation of function results, thereby achieving a high level of fuzzy reuse. One problem with LUT optimization is the difficulty of controlling the tradeoff between performance and accuracy. The current practice of manual LUT optimization adds programming effort by requiring extensive experimentation to make this tradeoff, and such hand tuning can obfuscate algorithms.

In this paper we describe a methodology and tool implementation to improve the application of software LUT optimization. Our Mesa tool implements source-to-source transformations for C or C++ code to automate the tedious and error-prone aspects of LUT generation such as domain profiling, error analysis, and code generation. We evaluate Mesa with five scientific applications. Our results show a performance improvement of 3.0 × and 6.9 × for two molecular biology algorithms, 1.4 × for a molecular dynamics program, 2.1 × to 2.8 × for a neural network application, and 4.6 × for a hydrology calculation. We find that Mesa enables LUT optimization with more control over accuracy and less effort than manual approaches.

Keywords: Lookup table, performance optimization, error analysis, code generation, scientific computing, memoization, fuzzy reuse

1. Introduction

Applications in scientific computing are often performance-limited by elementary function calls [28,33]. Such functions are common in scientific code, so designers have long studied how to accelerate them with lookup table (LUT) hardware [9,29]. Despite hardware support, software libraries often equal or exceed hardware performance, as shown in Table 1, possibly because software evolves more quickly than hardware [9]. Software LUTs can improve elementary function performance [33], but determining if a software LUT is applicable and optimizing its parameters by hand is cumbersome.

Table 1.

Performance of elementary function instructions

x86 instruction Execution time (ns) Math library Execution time (ns) Relative performance (%)
FSIN 35.2 sin 36.5 +3.6
FCOS 33.9 cos 36.9 +8.8
FPTAN 72.9 tan 51.8 −28.9
FSQRT 8.1 sqrt 1.8 −77.7

Note: Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core.

LUT optimization partitions the input domain of expressions or functions into intervals. Each interval is represented by a LUT entry that stores a single output value that is shared across all inputs in the interval. The original expression is replaced by an indexing function that locates the interval and returns its corresponding LUT entry. A LUT optimization is beneficial when (1) enough fuzzy reuse1 occurs to amortize the LUT initialization and overhead, (2) the LUT access is significantly faster than evaluation of the original function, and (3) the LUT can provide the needed accuracy without excessive memory use, such as is the case when the input domain is restricted.

Performance tuning methods such as LUT optimization require a substantial development effort for scientific programmers [26], because such domain-specific optimizations are usually applied manually [17]. Manual LUT optimization is time-consuming because of the need to explore parameters such as the table size and sampling method that determine the tradeoff between performance and accuracy. This paper presents a methodology and source-to-source transformation tool that automates the most time-consuming and error-prone steps required for LUT optimization, including error analysis, domain profiling and code generation.

Our LUT research was motivated by a collaboration with the Small Angle X-ray Scattering (SAXS) project [24] at Colorado State University (CSU). For the project we received R code that simulates the discrete X-ray scattering of proteins. We ported the SAXS code from R to C++, but its performance still failed to meet requirements. To reduce execution time we manually incorporated a LUT optimization for the dominant calculation. The result was a significant speed up, but our ad hoc approach for determining optimal LUT parameters was costly and had to be repeated for each architecture of interest. To simplify future LUT tuning we developed the Mesa tool. We have since used Mesa to tune a continuous version of SAXS scattering, a molecular dynamics program, a neural network and a hydrology calculation.

Table 2 shows the performance improvement and error statistics achieved using Mesa. The top two rows show variants of the SAXS application [24], the third row shows the Stillinger–Weber Molecular Dynamics (SWMD) program [14], the fourth row shows a CSU neural network application [19] and the fifth row evaluates a calculation from a Precipitation-Runoff Modeling System (PRMS) [21]. We attribute the effectiveness of LUT optimization to the high level of fuzzy reuse inherent in these applications, which are described in more detail in Section 3. Relative error is listed in all cases except PRMS, which reports absolute error. The relative error is misleading in this case because the computation of relative error divides the error by the original output. If this value is close to zero then the resulting relative error is huge, despite the small magnitude of the absolute error.

Table 2.

Mesa performance improvements and error statistics

Application name Original time Optimized time Speedup Maximum error Memory usage
SAXS discrete algorithm 283 s 41 s 6.9× 5.4 × 10−3% 4 MB
SAXS continuous algorithm 0.726 s 0.239 s 3.0× 1.8 × 10−3% 3 MB
SWMD simulation program 14.7 s 10.3 s 1.4× 2.9 × 10−2% 400 kB
CSU neural network 11.0 s 3.9 s 2.8× 6.2 × 10−2% 4 MB
PRMS hydrologic analysis 234 ns 53 ns 4.6× 3.2 × 10−5 800 kB

Notes: Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core. Relative error is shown for all applications except hydrologic analysis, which reports absolute error because its results are close to zero.

In a previous workshop paper [31], we described version 1.0 of the Mesa tool, which lacked support for domain profiling and linear interpolation and required a separate specification of candidate expressions outside the source code. We used this preliminary version of Mesa to optimize SAXS discrete scattering with 1D and 2D LUT optimization, and we showed that performance improvements in the scope of the SAXS application required the LUT data to fit into mid-level cache. A programmer using this version had to (1) manually identify candidate expressions and their domains, (2) specify the expressions and constituent variables in a file, (3) run Mesa to generate code and (4) manually integrate the resulting code back into the application.

In this paper, we present a pragma-based approach to apply LUT optimization to expressions in C or C++ source code, thereby extending the reach of Mesa to full applications. We show that version 1.1 of Mesa reduces programming effort by automating the generation and integration of LUT optimization code. We have added boundary error analysis to improve tool performance, and linear interpolation sampling to increase accuracy. The major benefit of this work is to allow the programmer to more easily find an effective set of optimizations, while receiving feedback about the introduced error. We have also evaluated version 1.1 of Mesa in the context of four additional scientific applications, as shown in Table 2 and described in Section 3.

The primary contributions of this paper are:

  • A methodology for software LUT optimization, so that programmers will no longer need to depend on ad hoc methods.

  • A demonstration of domain profiling, error analysis, and code generation in the context of full applications using our Mesa tool.

  • Additional experimental results that suggest the LUT data must reside primarily in mid-level cache to be effective.

  • An investigation of the error and performance differences between direct access and linear interpolation.

  • A case study showing that LUT optimization maintains its effectiveness in the context of parallel execution on a multicore architecture.

Section 2 introduces our LUT optimization methodology and the Mesa tool. Section 3 presents case studies on the use of Mesa to optimize applications, and evaluates the effectiveness of the tool in terms of performance and programming effort. Section 4 explores related work and Section 5 describes limitations. Section 6 lists threats to validity and Section 7 concludes.

2. LUT optimization methodology and Mesa

The goal of our research is to help scientific programmers use LUT optimization in a more effective and efficient manner. Because the existing literature lacks a systematic methodology for LUT optimization, we define our own. We have broken down the process into the following steps:

  1. Identify elementary functions and expressions for LUT optimization.

  2. Profile the domain and distribution of the LUT input values.

  3. Select the LUT size based on the desired input granularity.

  4. Analyze the error characteristics and memory usage of the LUT data.

  5. Generate data structures and code to initialize and access LUT data.

  6. Insert the generated LUT code into the application.

  7. Compare performance and accuracy of the original and optimized code.

The current practice for LUT optimization is to write code manually, often without careful analysis of the performance or error implications. Our methodology is independent from its implementation in a tool, for example we can apply the steps shown above manually. However, a methodology is especially important to when considering automation. We developed the Mesa tool to automate the most time-consuming part of the methodology shown above, including steps 2, 4, 5 and 6. Mesa can optimize elementary function calls including sin, cos, tan, exp, log, and sqrt. Mesa also optimizes expressions identified by pragmas, including combinations of elementary functions and arithmetic operators: +, −, * and /. A description of how Mesa supports the methodology follows.

Mesa does not support identification of candidate functions and expressions (Step 1), since many suitable profiling tools such as gprof [13] already exist. Mesa automates domain profiling (Step 2) by generating an instrumented version of the application to capture the domain boundaries and distribution. LUT size selection is specified on the command line (Step 3), however Mesa provides detailed error analysis (Step 4) so that the programmer can iterate size selection and error analysis until the LUT optimization meets the application requirements. Mesa reduces development time by completely automating code generation and integration (Steps 5 and 6). The comparison of the original and optimized code (Step 7) remains manual.

2.1. Elementary function optimization

To demonstrate the methodology with a simple example, we show the optimization of a single elementary function with Mesa. Figure 1 shows command line and program output from a Mesa run that optimizes sine calls. The command line specifies the original and optimized source files, elementary function(s) to be optimized, table size and error analysis method. Mesa uses the Rose compiler infrastructure [16,23] to parse the file into an abstract syntax tree (AST) on which it can operate.

Fig. 1.

Fig. 1

Optimizing elementary functions with Mesa.

Figure 2 shows the generated code, which is defined and instantiated as a C++ class with everything needed for the optimization, including a public method for the LUT approximation function. Mesa inserts the C++ class at the beginning of the module, and replaces instances of the original function with a call to this method. Mesa calls Rose to unparse the modified AST into an output file with the LUT code. The optimized file is substituted for the original file and the application is rebuilt.

Fig. 2.

Fig. 2

Listing of code generated by Mesa.

The sine tables in Fig. 3 are generated by running Mesa with a direct access sampling method, meaning without any form of interpolation between entries. We show small LUT sizes of 16 and 32 entries to illustrate the error terms. The original function is shown by f (θ) and the approximation is shown by l(θ). The area between the original function and approximation represents the magnitude of the error introduced by the LUT, which is plotted as e(θ). For direct access, the error term is the error at the center of each LUT interval, because Mesa evaluates the original function at the center to compute the output value. The maximum error occurs at the boundaries of the LUT interval. The graphs in Fig. 3 show the tradeoff between LUT size and accuracy. Tables with more entries exhibit smaller errors and vice verse.

Fig. 3.

Fig. 3

Lookup tables for sine function: direct access. (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

2.2. Pragma-based expression optimization

Figure 4 shows the workflow for expression optimization, which is a superset of elementary function optimization. The programmer starts by running the original code to establish a baseline for performance and accuracy. Domain profiling and optimization require the programmer to insert a pragma into the C or C++ source code to identify the target expression. Elementary function optimization does not require pragma insertion because elementary functions are easily identified by Mesa.

Fig. 4.

Fig. 4

Workflow diagram for Mesa. (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

Figure 5 shows a code fragment after addition of the pragma. The code shown is the dominant calculation of SAXS discrete scattering. Domain profiling is initiated with a command line option that creates an instrumented version of the unoptimized program. When the program runs, profiling information is gathered and written to a data file. The workflow continues by running Mesa with the same pragma flag, this time requesting expression optimization. During optimization Mesa reads the profiling data, performs an error analysis, and generates LUT code and data structures. As with elementary function optimization, the LUT size must be specified.

Fig. 5.

Fig. 5

Insertion of a pragma for expression optimization.

Figure 6 shows the Mesa command line and output for expression optimization. The -pragma flag causes Mesa to insert code for the specified LUT optimization into the application, and Mesa optionally performs error analysis. The programmer may need to run Mesa several times to determine whether the LUT optimization can meet accuracy requirements while fitting into mid-level cache, but repeated runs can be scripted. When this is complete the programmer compiles and runs the generated code and compares its performance and accuracy against the original version. The next sections provide detail on domain profiling, error analysis, and code generation.

Fig. 6.

Fig. 6

Optimizing an expression with Mesa.

2.3. Domain profiling

To determine the extent of LUT data, we must capture the domain of each input variable. Mesa does this through a profiling option that generates a transformation to add instrumentation to the program. The programmer can characterize the input domain by running the instrumented program with representative data sets. Mesa stores domain information in a data file that can be edited, so that a programmer can use domain expertise to adjust the domain boundaries if necessary. If the data file is missing, Mesa prompts for domain values. When the domain is known in advance, the programmer can optimize the code without profiling by creating the data file manually. Mesa additionally supports the generation of assert statements that halt execution and report an error condition if the domain is exceeded during program execution.

Some elementary functions are cyclical, so the input domain is intrinsically known. For example, sine and cosine tables need only store the interval from 0 to 2π radians. Input values outside of that interval can be folded back by a modulo operation or iterative addition and subtraction. This operation is called domain conditioning or range reduction. Mesa has a command line option to generate domain conditioning code for cyclical functions such as sine and cosine, as shown in Fig. 2.

Mesa captures the domain of input variables and the number of executions of the expression. The former is necessary to build LUT data, and the latter is intended for future support of performance modeling. We have experimented with a modified version of Mesa that captures the complete distribution of input data. Figure 7 shows the distribution of the input variable rTheta from the SAXS discrete scattering application. Note that the left half of the LUT is used much more frequently than the right side.

Fig. 7.

Fig. 7

Domain distribution for SAXS lookup table. (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

Figure 7 suggests that some LUT optimizations may benefit from storing only a partial domain. This requires the generation of conditional code that accesses LUT data only inside the partial domain. Outside of the partial domain the original function must be called. For the applications we have evaluated, the cost of the conditional negates the benefit of the reduced LUT size, but our preliminary data is too limited to generalize this result.

2.4. Error analysis

Error analysis computes LUT error statistics by combining the individual error terms as shown in Fig. 3. We are primarily interested in the maximum error Emaximum and the average error Eaverage over the entire LUT domain. These statistics allow us to characterize the error introduced by the LUT approximation. Computing error statistics is essentially a problem of sampling the LUT domain. Within each interval the error analysis code computes error terms for a set of samples by evaluating the original and approximation functions. Mesa implements three different algorithms for sampling: exhaustive, stochastic, and boundary. Each computes the error statistics for all LUT intervals, then combines the results to get values for the entire LUT.

The exhaustive method performs a brute force numerical traversal of the input domain, at a resolution of FLT_EPSILON or 1.2 × 10−7. This yields an exact answer for single-precision LUT data, but the method is very expensive. On our benchmark system (Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core), exhaustive sampling requires approximately 40 s to analyze the domain [0.0, 20.0] for the SAXS discrete scattering. This fails to meet our goal of performing error analysis on multiple expressions in real time.

The stochastic method samples the domain randomly. The key drawback for this method is the lack of a general rule for determining the number of samples required to converge on an accurate answer. Our experiments show stochastic sampling computes a value of Eaverage that approaches the exhaustive method with an order of magnitude fewer samples, however its computation of Emaximum can vary widely. The performance of stochastic sampling for the domain listed above is less than 5 s on the benchmark system. Because of the inaccuracy of the Emaximum computation, we have deprecated the stochastic method in Mesa.

The boundary method makes the simplifying assumption that the maximum error can be found at the LUT interval boundaries for direct access, and at the LUT interval center for linear interpolation, as proposed by Zhang et al. [33]. This computation takes less than 0.2 s on the benchmark system, and the results are identical within 1.2 × 10−5 of exhaustive sampling for the applications we evaluate in this paper. The boundary method computes only Emaximum, since Eaverage requires more extensive sampling. We use the boundary method for fast determination of error statistics.

Figure 8 shows error statistics generated by Mesa. We collected the data by calling Mesa from a script for the series of LUT sizes shown. Exhaustive error analysis was used to compute both Emaximum and Eaverage. The graph shows one of the main benefits of Mesa, which is that the tool allows the programmer to evaluate the accuracy of different LUT sizes. Note the linear relationship between accuracy and table size. This is common for smooth functions such as trigonometric operations. For the sine table we see a 2× decrease in error for each 2× increase in table size.

Fig. 8.

Fig. 8

Error for different sizes of sine tables. (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

We conclude from the graph that LUT sizes that fit easily within mid-level cache on a modern processor can produce usable error values. For example, the 256 kB sine table shown in Fig. 8 has a maximum error of 4.82 × 10−5 and an average error of 1.53 × 10−5. In Section 3 we show that such tables can significantly increase performance.

So far we have only discussed the error that occurs at the time that a function result is approximated. Returning an imprecise function result causes a computational error, which is propagated through the application by further calculations that use the function result. The numerical analysis of this error propagation is beyond the scope of the current version of Mesa, but measuring the application error is critical to the success of the LUT optimization. For this reason, our methodology includes a manual comparison of the accuracy of the original and optimized application. For each application in this paper, we compute the maximum error and average error based on the final output of the application. These statistics, along with the measured performance improvement, form the basis for deciding whether a particular LUT optimization is beneficial.

2.5. Code generation

We have shown the code generated by Mesa in Fig. 2. Mesa uses the Rose compiler [23] to implement code transformations, thereby leveraging the ability of Rose to parse and unparse arbitrary C and C++ syntax. Code generation and code integration is done by the Mesa tool itself. The current implementation inserts a C++ object at the beginning of the source module being processed. A global declaration ensures that the object is constructed when the application starts and destroyed when it ends. The initialization of LUT data is performed by the constructor, based on a reconstructed function that mirrors the original computation, and LUT data is freed by the destructor on application exit. The LUT approximation function is public and can therefore be called from anywhere in the application.

The current implementation operates on C or C++ code, but the resulting program must be compiled with C++ because Mesa generates code that contains C++ objects and containers. Mesa generates single-precision LUT data, which is sufficient for the applications and LUT sizes we have studied. Single-precision uses less cache memory, and we find that linear interpolation is more effective for increasing accuracy than double-precision. However, double-precision LUT data could potentially benefit applications with high accuracy requirements and very restricted domains. Further investigation is require to characterize how such a change of precision would affect accuracy and performance. The topic of using single-precision versus double-precision math in scientific computations is explored by Buttari et al. [4].

2.6. Sampling methods

The sampling method determines how the output is computed from LUT entries. The simplest form of LUT optimization uses direct access, which returns the closest individual LUT entry to an input value. We can reduce approximation error without increasing memory usage by employing linear interpolation between adjacent LUT entries. Interpolation improves the LUT accuracy but adds computation and an extra LUT access for each evaluation, since the LUT value on both sides of the input value must be fetched.

The sine tables in Fig. 3 are made using direct access, while Fig. 9 graphs the same 16 and 32 entry sine tables using linear interpolation. Linear interpolation combines the two closest LUT entries based on the relative distance from the input value. In contrast to direct access, linear interpolation has zero error at the boundaries instead of the center. Conversely the maximum error is close to the center for linear interpolation. Accuracy can be further improved by techniques such as polynomial reconstruction, which is commonly used in hardware solutions where the increased computational load can be handled by additional circuitry. We plan to add polynomial reconstruction as a future enhancement to Mesa. Mesa supports direct access by default, and linear interpolation is enabled through a command line option. We find that linear interpolation improves the error by approximately an order of magnitude for the elementary functions. In Section 3 we compare the accuracy and performance of direct access and linear interpolation on the SAXS discrete scattering code.

Fig. 9.

Fig. 9

Lookup table for sine function: linear interpolation. (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

In summary, we have defined a methodology for LUT optimization and its implementation in the Mesa tool. Mesa optimizes elementary functions and expressions that combine those functions with basic math. A programmer uses Mesa by inserting one or more pragmas to identify candidate expressions. The programmer then runs Mesa to create a profiling version of the application that captures and stores domain information. Mesa reads the domain information and automatically generates a LUT optimized version of the application. The process completes when the user evaluates the performance and accuracy of the optimized code versus the original. In the next section we evaluate Mesa on a set of scientific applications.

3. Case studies

We evaluate our methodology in terms of ease of use, accuracy, and performance by using Mesa to optimize five scientific applications. The first two applications are part of the SAXS project [24], a multi-disciplinary project at CSU between the Molecular Biology, Mathematics, Statistics, and Computer Science departments. SAXS is an experimental technique that explores the structure of molecules [11]. SAXS can be simulated on a computer via discrete or continuous algorithms. A partial discrete scattering simulation was written in the R language by members of the Statistics department, then ported to C++ and completed by one of the authors of this paper. A complete simulation of continuous scattering was written in MATLAB by members of the Math department, then ported to C++ by various people in the Computer Science department. The SAXS code base for both algorithms currently consists of around 5000 lines of C++, not including documentation, data, and test code. The third application is SWMD, a molecular dynamics program developed and used for research at Cornell University [14]. It consists of slightly more than 3000 lines of C. The fourth application is neural network code [19] developed by a faculty member in our Computer Science department and used in [3], which contains around 1100 lines of C. We have modified the C applications minimally to support C++ compilation and Mesa optimization. The fifth case study evaluates a computation from the Precipitation-Runoff Modeling System (PRMS) developed by the United States Geologic Survey [21] for hydrologic modeling. We were given Java code containing an expensive function that computes a slope aspect, which we have converted into approximately 1000 lines of C++. We refer again to Table 2 for a summary of the performance improvement and error statistics for each application.

3.1. Molecular biology

Our first case study is the SAXS application that simulates the discrete scattering of a molecular model using Debye’s formula [11] shown in Eq. (1).

I(θ)=2∑i=1N-1∑j=i+1NFi(θ)Fj(θ)×sin(4πrθ)/(4πrθ). (1)

The formula computes the intensity based on the interaction of pairs of atoms in the molecule. The code with the dominant calculation was shown in Fig. 5. The fDistance variable represents the distance between atoms, calculated in the middle loop. The fTheta variable is the scattering angle, which varies for each iteration of the outer loop. The only elementary function called in the loop is the sine function.

Performance profiles of the SAXS scattering code show that the expression with the sine call dominates the computation, so we identify this expression with a pragma. We invoke Mesa multiple times with the pragma option, varying the LUT size. Mesa constructs a LUT optimization of the expression on the right-hand side of the assignment statement following the pragma. A previous run using the Mesa profiling option captured the input domain as approximately 0.0–20.0, so Mesa builds a LUT over this domain.

For each table size, we run the application and compare the performance and accuracy with that of the original code. Figure 10 shows the results from this experiment. The original time Toriginal and optimized time Toptimized are measured against the right axis. The vertical line in the graph indicates the amount of L2 cache in the system. The graph shows that the original time is constant and the optimized time increases with the memory usage. Amaximum and Aaverage are measured against the left axis.

Fig. 10.

Fig. 10

SAXS discrete scattering simulation results (Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core). (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

Based on the graph in Fig. 10, we select 4 MB as the optimal LUT size to stay within the biochemists’ requirements for accuracy without overflowing the L2 cache. The performance improvement is 6.9×, with a maximum error 4.6 × 10−3%. For the SAXS discrete scattering code we initialize the table by evaluating the expression approximately 1 million times. The resulting table is accessed 4.6 billion times by the application, so each table entry is reused more than 4600 times on the average.

Our second case study uses code that implements another set of equations that model X-ray scattering, using a continuous instead of a discrete algorithm. The C++ code for the inner loop of continuous scattering is shown in Fig. 11. Note the use of three elementary functions: exponential, sine, and cosine. The equations that define continuous scattering are shown in Eq. (2).

Fig. 11.

Fig. 11

SAXS continuous scattering code.

I(q,ψ)=(∑j=1Ndje-σj2q·q/2cos(q·μj(ψ)))2+(∑j=1Ndje-σj2q·q/2sin(q·μj(ψ)))2. (2)

Performance profiles of the SAXS continuous code show that elementary function calls dominate the computation. We invoke Mesa to optimize the sine, cosine, and exponential function calls, varying the table size. Figure 12 shows the results of optimizing the continuous scattering code, with the same statistics as for the discrete case. Optimized performance varies from 4.5× to 2.5× of the original when the LUT fits into L2 cache, then quickly degrades to slower than the original code when L2 cache is exhausted. The graph in Fig. 12 shows 3 MB as the optimal LUT size. The performance improvement at this point is 3.2×, with a maximum error 1.8 × 10−3%. The LUT size on the graph represents total memory usage of all three elementary function tables. During initialization, the continuous scattering computes 100,000 LUT entries for each of the three elementary functions, but the application calls each function at least 7.9 billion times, for an average of over 70,000 reuses per LUT entry. LUT optimization of discrete and continuous scattering improves for larger molecules, as shown in Table 3. The main reason for this is that LUT initialization is amortized over more computation.

Fig. 12.

Fig. 12

SAXS continuous scattering simulation results (Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core). (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

Table 3.

Saxs optimization performance and error on different molecules

Algorithm type Molecular model Number atoms Speedup Maximum error Memory usage
Discrete scattering 4gcr.pdb 1556 6.8× 3.7 × 10−3% 4 MB
Discrete scattering 1xib.pdb 3052 6.9× 4.6 × 10−3% 4 MB
Discrete scattering 3eqx.pdb 5897 7.7× 9.4 × 10−3% 4 MB
Continuous scattering 4gcr.pdb 1556 2.9× 7.1 × 10−4% 3 MB
Continuous scattering 1xib.pdb 3052 3.0× 1.8 × 10−3% 3 MB
Continuous scattering 3eqx.pdb 5897 3.8× 1.9 × 10−2% 3 MB

Note: Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core.

3.2. Molecular dynamics

Our third case study is SWMD [14], a molecular dynamics program that models the physical movement of atoms and molecules by computing the potential energy and interaction forces of particles. The simulation is performed over a series of time steps to predict particle trajectories. Many molecular dynamics applications exist, but we have chosen SWMD because the code contains a manual LUT optimization done by the original authors. The dominant calculations in SWMD are based on the potential energy equations [27] of the same name, which take into account 2-body (φ2) and 3-body (φ3) interactions that call the exponential function, as shown in Eqs (3) and (4):

E=∑i∑j>iφ2(rij)+∑i∑j≠i∑k<iφ3(rijrikθijk), (3)
φ2(rij)=Aijεij[Bij(σijrij)pij]×exp(σijrij-aijσij), (4)
φ3(rij,rikθijk)=λijkεijk[cosθijk-cosθ0ijk]2×exp(γijσijrij-aijσij)exp(γikσikrik-aikσik).

The original version of SWMD optimized the 2-body and 3-body calculation by precomputing multiple lookup tables for series of expressions. To evaluate SWMD we removed LUT optimization code from the original version and inserted straightforward implementations of the Stillinger–Weber equations into the 2-body and 3-body loops. We used the resulting un-optimized version of Stillinger–Weber as a baseline for performance and accuracy. The process required several minor modifications before we could run Mesa, including type casts to allow C++ compilation and the coalescing of the 3-body computation into a single expression. Profiling showed that the 3-body computation was dominant, with more than 55% of execution time as compared to 8% for the 2-body, so we focused on the 3-body code.

We applied the Mesa tool by identifying the 3-body expression with a pragma and entering the domain limits, which are constant in this application. The performance and error results are shown in Table 4. The Mesa version achieves 4.5× better accuracy with 14× less memory usage than the original code, but the performance is 16% slower. We modified the Mesa-generated code by hand to include all of the expressions optimized by the original version. By doing so we were able to closely match the performance of the original version of SWMD, with 3.5× better accuracy and 2.8× less memory usage. Mesa currently cannot handle this combination of expressions, but we are working on a new version that can.

Table 4.

Stillinger–Weber molecular dynamics simulation results

Program version Execution time (s) Performance speedup Application error (%) Memory usage
Original 8.82 1.67× 0.135 5.6 MB
Mesa (manual) 8.94 1.62× 0.038 2.0 MB
Mesa (automated) 10.29 1.42× 0.030 400 kB
Unoptimized 14.76 1.00× 0.000 0.0 MB

Note: Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core.

We also investigated the difference in accuracy between the original and Mesa versions. We found that the ad hoc optimization propagates and magnifies error terms by combining LUT values in successive expressions. Mesa avoids this problem by optimizing only the critical expression. The disparity in memory usage between these versions is because (1) Mesa stores single-precision values and the original tables were double-precision, and (2) many fewer expressions were optimized in the Mesa version. Mesa allowed us to experiment with different LUT sizes, and we discovered that we could improve accuracy significantly with a relatively small table. Another benefit from using Mesa is that the entire optimization required only the addition of a single pragma to the code.

3.3. Neural networks

Our fourth case study evaluates neural network code [19] developed by Chuck Anderson at CSU. Profiling showed that the evaluation of transfer functions in the neural network was a performance bottleneck that consumed approximately 47% of the execution time. Two commonly used transfer functions are the logistics f = 1.0/(1.0 + ex), and hyperbolic tangent f = tanh(x), both of which call elementary functions. We optimized both functions, and the results are shown in Table 5. The error terms may be less significant than shown, since we conservatively compute them as the difference of small numbers, instead of scaling them based on the range of possible solutions. The memory usage in both cases was 4 MB, but we were also able to increase the size of the LUT to exceed L2 cache without significant performance degradation. It appears that the number of LUT accesses is much smaller than the entire table, thus the LUT data does not actually over-flow L2 cache.

Table 5.

Mesa results on neural network code

Transfer function Original time (s) Optimized time (s) Speedup Original result Optimized result Maximum error (%)
Logistics 7.9 3.8 2.1× 0.12407 0.12408 8.8 × 10−2
Hyperbolic tangent 11.0 3.9 2.8× 0.000295 0.000277 6.1 × 100

Note: Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core.

3.4. Hydrology modeling

Our final case study is a slope aspect computation from the PRMS application [21] developed by the United States Geological Survey (USGS). The function we optimized is used by PRMS to compute the slope aspect for a single point on a terrain grid based a variety of parameters including the latitude and declination. The computation is shown in Fig. 13, and the results of the optimization are shown in Table 2. The prevalence of sine and cosine calls make this code a good candidate for elementary function optimization, allowing Mesa to achieve a 4.6× speed up with a small error. The number of variables in the slope aspect computation preclude expression optimization with version 1.1 of Mesa.

Fig. 13.

Fig. 13

PRMS slope aspect computation.

3.5. Interpolation versus direct access

The results shown so far were generated with the direct access sampling method. Mesa supports linear interpolation, which samples the adjacent LUT entries and combines them in a linear fashion according to their distance from the input value. Figure 14 compares direct access and linear interpolation using the SAXS discrete scattering code. Execution time and maximum application error are shown in the graph for both methods. The extra computation for interpolation makes it slower than direct access. For the LUT sizes shown, linear interpolation yields a speed up from 4.5× to 6.1×, as compared to a 6.1× to 10.7× speed up for direct access. The shape of the performance curves is almost identical, implying that cache penalties affect both cases similarly. The maximum error for linear interpolation starts at almost an order of magnitude better for the smallest LUT size and improves quickly until an advantage reaches more than two orders of magnitude in the center of the graph. Thus linear interpolation may allow the LUT optimization to meet accuracy requirement in cases where direct access would overflow the mid-level cache.

Fig. 14.

Fig. 14

Comparison of interpolation versus direct access (Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, single core). (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

3.6. Case study summary and evaluation

We define two criteria for evaluating our methodology. The first criterion is effectiveness, which we measure quantitatively by comparing the performance and accuracy of the Mesa code against the original version. The second criterion is programming effort, which we define qualitatively as the effort needed to apply a LUT optimization with Mesa as compared with the manual process. We believe that programming effort is reduced in proportion to ease of use of the tool. The LUT optimizations shown in this section are effective because they achieve a significant speed up while meeting application accuracy requirements, as shown by results of the case studies in Section 3.

Programming effort is greatly reduced over the original ad hoc implementation for the SAXS discrete code, which required several weeks of development time and experimentation, even after completion of the original algorithm. Characterization of error was especially time-consuming, because it required multiple runs of the entire SAXS application. Mesa error analysis allowed us to quickly identify efficient set of LUT parameters without overflowing mid-level cache. The SAXS continuous code was never optimized manually because Mesa was available during its development period. Optimization of both the SAXS discrete and continuous code was done in a matter of hours with Mesa, including the error analyses shown in Figs 10 and 12. We additionally find that the Mesa code very closely matches the performance of the manually developed SAXS code. The other applications were just as easy to optimize with Mesa, requiring at most a single pragma. The development time for the manual optimization of the SWMD code is unknown, but it is obvious that many complex code changes were required, along with experimentation with table size versus performance and accuracy. The other applications did not contain a prior LUT optimization, so no direct comparison of development time is impossible.

3.7. Parallel efficiency

Much of the current research in scientific computing focuses on multi-core performance and programming effort. An important trend in multi-core systems is the decrease in memory access performance relative to processor throughput. This motivates research on program transformations that minimize memory accesses. Despite this, we see no reason to neglect single-core performance, as long as the resulting optimizations remain equally beneficial in the multi-core environment. We verify that our optimizations meet this criteria by comparing multi-core scaling on programs optimized with Mesa. We have parallelized the SAXS discrete and continuous scattering loops with OpenMP directives. Figure 15 shows that our optimizations scale well on a Cray XT6m computer, and we have replicated this on several multi-core systems including the benchmark system shown throughout the paper (Intel Xeon E5450, 3.00 GHz, 6 MB L2 cache, eight cores). We conclude that our single-core optimizations are independent from and complementary to parallelization.

Fig. 15.

Fig. 15

Parallel efficiency of SAXS application (Cray XT6m, AMD Opteron 6100, 2.5 GHz, 512 kB L2, 6 MB L3, 24 cores). (Colors are visible in the online version of the article; http://dx.doi.org/10.3233/SPR-2011-0329.)

4. Related work

Optimizing compilers are efficient at improving the serial performance of applications. However, the scope of optimizations provided by compilers is somewhat limited. Current compilers do not generate algorithmic improvements or more efficient numerical techniques, nor can they completely automate parallelization. As a result, manual tuning consumes a significant amount of the development effort for scientific applications [26]. Besides increasing programming effort, manual tuning has the disadvantage of obscuring algorithms [17].

A current research topic in scientific computing is how to decrease the programming effort [17] required to parallelize existing codes. Previous models such as POSIX threads required an intensive programming effort and special expertise. Current models such as OpenMP [6] raise the level of abstraction for the programmer, reducing the amount of code that needs to be written. Inserting pragmas is well accepted by scientific programmers using OpenMP, so we have adopted the same model for Mesa. The end goal is automation, which reduces effort by freeing programmers from low level details [5].

The LUT optimization approach described in this paper is motivated by the observation that some applications evaluate elementary functions repeatedly with inputs within a restricted domain. This repeated computation can be avoided by caching the results of function evaluation for later reuse. Memoization [1] is a similar approach that reduces computation by caching function results. Typically memoization algorithms guarantee precise reuse, meaning that function results are always exact. Alvarez et al. [2] propose fuzzy memoization in which fuzzy reuse allows results to be reused when the input closely matches a previous evaluation. This achieves a much higher level of reuse, but introduces error into the computation. The main difference between LUT optimization and memoization is that LUT methods compute results for the entire domain in advance, eliminating the overhead of identifying whether or not a result has been previously cached.

Considerable research has focused on optimizing the performance of elementary functions. The idea of approximating elementary functions in hardware is long established, for example Gal [10] proposed combining a LUT with a minimax polynomial. Frequently cited papers by Tang [29,30] apply similar methods to implement elementary functions under the IEEE 754 floating-point specification [12]. LUT methods remain popular because they provide good performance at a reasonable hardware cost. Much of the recent literature focuses on variants of polynomial reconstruction to improve the accuracy of function evaluation between reference points [20].

There are few academic references on software LUTs, but some books [22] and articles encourage the use of ad hoc techniques. A series of papers on LUT hardware for function evaluation in FPGAs [8,25] has culminated in a paper by Zhang et al. [33] that explores both hardware and software LUT methods. Zhang et al. present a compiler that transforms functions written in a “MATLAB-like” language into C or C++ code suitable for multi-core execution. Mesa performs a similar transformation in the context of C or C++ source code, allowing optimization of entire applications. Similar to our research, Zhang et al. show that LUT optimizations outperform standard C and C++ code that calls elementary functions in the math library. Zhang et al. conclude that (1) linear interpolation is a minimal requirement, (2) LUT size is not a problem because of modern L2 cache sizes, and (3) the extra expense of polynomial reconstruction may not be worthwhile in software.

The only other related work that we are aware of that addresses the impact of cache usage on LUT performance is Defour [7]. Defour concludes that LUT sizes must fit within L1 cache, however this observation is based on very small tables in conjunction with highly accurate polynomial reconstruction. We show that LUTs up to the size of the L2 cache can improve the performance of function evaluation. We also extend the literature by comparing the performance of direct access and linear interpolation across a range of LUT sizes, and we find that lower overhead makes direct access worthwhile in some cases.

5. Limitations

The primary limitation of the Mesa tool is that it parses only C and C++ code, and the resulting optimized code must be compiled with a C++ compiler. Mesa is currently limited to the elementary functions sin, cos, tan, exp, log and sqrt, but new functions are easily added. Mesa does not support all possible C++ syntax, thus minor modifications may be required before using the tool. For example, variables declared as const are not detected as constants, and must be replaced with preprocessor defines, and type casts are not allowed in candidate expressions. Mesa is also limited to expressions that depend on a single free variable, so the tool will not detect and generate multi-dimensional LUT data.

The main limitation of LUT optimization is that the technique is suitable only for programs that are performance-limited by computations with elementary functions. Such computations are common in scientific computing, but many applications are performance-limited by memory accesses. These applications may not benefit from LUT techniques, and the increase in memory usage can actually decrease performance. However, having access to a lightweight performance tool such as Mesa greatly reduces the effort required to see whether an application can benefit from LUT optimization. A second limitation is that LUT data must share mid-level cache memory with the application to avoid cache penalties. In practice this is often done successfully, as shown by the case studies in this paper. The final limitation of LUT optimization is that some applications may be unable to tolerate the decreased accuracy inherent to LUT optimization. In contrast, many scientific simulations are known to be based on very imprecise data, yet they often make pervasive use of expensive high-precision floating-point operations. These applications may be able to achieve a significant benefit without comprising results. Several precedents for reducing the precision of elementary functions exist, including the Enhanced Performance mode of the Intel Vector Math Library (VML) [15].

6. Threats to validity

There are four general types of validity relevant to empirical research: conclusion validity, internal validity, construct validity, and external validity [32]. A study has conclusion validity if we can conclude that there is a relationship between study variables of interest. Our study exhibits conclusion validity since we can safely conclude that, among the programs in our study, programs with LUT optimization have better performance than those without LUT optimization. We can also safely conclude that it takes more effort to perform the optimizations by hand than by using Mesa.

Internal validity focuses on whether or not there is a causal relationship between the treatment and external variables. Threats to internal validity include having no rationale for the relationship between treatment and outcome. In addition, other unmeasured factors that might be the real cause of the outcome are threats to internal validity. In our study, there is a clear rationale for a cause and effect relationship between LUT optimization and the dependent variables: performance, accuracy, and programming effort. Other unmeasured factors should not affect the outcome, since the only change to the program is the replacement of function calls with a LUT access.

A study has construct validity when the treatment used in the study accurately represents the concepts that we mean to study, and the measurements of variable attributes are valid. Mesa performs LUT optimization in a manner consistent with the descriptions of manually performed LUT optimization in the literature. The measures of performance and accuracy are clearly valid. The measurement of programming effort in terms of programming time is consistent with the general notion of effort; a reduction in the time required to implement a program represents a reduction in effort.

Results of a study with external validity will generalize beyond the study data itself. External validity is often an issue with empirical research, because of the limited number and scope of the applications that can be evaluated. We would need to study a random sample of all scientific applications to eliminate all threats to external validity, but such a sampling is not practical. Our empirical evaluation consists of case studies of five such applications in four scientific areas. Further research is required to demonstrate applicability to other scientific domains, and to better understand where our methodology is most appropriate. However, we believe that the results in this paper will generalize to applications that share the characteristic of being limited primarily by the evaluation of elementary functions.

7. Conclusions

This paper presents the Mesa source-to-source transformation tool and an associated methodology for LUT optimization. We evaluate Mesa on five scientific applications from four domains, and find that our tool reduces the effort associated with LUT optimization. Our approach improves the current practice of manual tuning by allowing programmers to create and analyze LUT optimizations with very little effort and without writing code. Mesa error analysis lets programmers improve performance with clear knowledge of the effect on accuracy, without costly experimentation. The case studies in this paper provide additional evidence that software LUT optimization can exploit the fuzzy reuse inherent in many scientific programs to produce significant performance gains of 1.4× to 6.9×, while maintaining reasonable error bounds. The code for version 1.1 of Mesa as described in this paper is available from our web site [18].

Acknowledgments

This project is supported by Award Number 1R01GM096192 from the National Institute Of General Medical Sciences. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institute Of General Medical Sciences or the National Institutes of Health. This project is also supported by grant number DE-SC0003956 from the Department of Energy. Additional support comes from seed funding from the Vice President of Research and the Office of the Dean of the College of Natural Sciences at Colorado State University and from a Department of Energy Early Career grant. This research utilized the CSU ISTeC Cray HPC System supported by NSF Grant CNS-0923386. We gratefully acknowledge the many partners who have shared code with us, including Stefan Sillau, Ryan Croke, and Mark van der Woerd for the SAXS code, Paulette Clancy for the SWMD program, Chuck Anderson for the neural network application, and Olaf David and George Leavesley for the PRMS code, and the anonymous reviewers from the Scientific Programming journal whose comments helped improve this paper.

Footnotes

1

Fuzzy reuse is a concept introduced by Alvarez et al. [2] in which function results are approximated in order to increase reuse.

References

  • 1.Acar UA, Blelloch GE, Harper R. Selective memoization. Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL’03; ACM, New York, NY, USA. 2003. pp. 14–25. [Google Scholar]
  • 2.Alvarez C, Corbal J, Valero M. Fuzzy memoization for floating-point multimedia applications. IEEE Transactions on Computers. 2005;54(7):922–927. [Google Scholar]
  • 3.Anderson CW, Devulapalli SV, Stolz EA. Determining mental state from EEG signals using parallel implementations of neural networks. Sci Program. 1995;4:171–183. [Google Scholar]
  • 4.Buttari A, Dongarra J, Kurzak J, Luszczek P, Tomov S. Using mixed precision for sparse matrix computations to enhance the performance while achieving 64-bit accuracy. ACM Trans Math Softw. 2008;34(4):1–22. [Google Scholar]
  • 5.Cong G, Seelam S, Chung I, Wen H, Klepacki D. Towards a framework for automated performance tuning. Proceedings of the 2009 IEEE International Symposium on Parallel and Distributed Processing; IEEE Computer Society, Washington, DC, USA. 2009. pp. 1–8. [Google Scholar]
  • 6.Dagum L, Menon R. Computational Science Engineering. 1. Vol. 5. IEEE; 1998. OpenMP: an industry standard API for shared-memory programming; pp. 46–55. [Google Scholar]
  • 7.Defour D. Technical Report 2002–38. Ecole normale superieure de Lyon; 2002. Cache-optimised methods for the evaluation of elementary functions. [Google Scholar]
  • 8.Deng L, Chakrabarti C, Pitsianis N, Sun X. Automated optimization of look-up table implementation for function evaluation on FPGAs. Proceedings of SPIE. 2009;7444:Article ID: 744413. [Google Scholar]
  • 9.Detrey J, de Dinechin F, Pujol X. Return of the hardware floating-point elementary function. Proceedings of the 18th IEEE Symposium on Computer Arithmetic; IEEE Computer Society, Washington, DC, USA. 2007. pp. 161–168. [Google Scholar]
  • 10.Gal S. Computing elementary functions: a new approach for achieving high accuracy and good performance. Proceedings of the Symposium on Accurate Scientific Computations; Springer-Verlag, London, UK. 1986. pp. 1–16. [Google Scholar]
  • 11.Glatter O, Kratky O. Small Angle X-ray Scattering. Academic Press; London, UK: 1982. [Google Scholar]
  • 12.Goldberg D. What every computer scientist should know about floating-point arithmetic. ACM Comput Surv. 1991;23:5–48. [Google Scholar]
  • 13.Gough B. An Introduction to GCC for the GNU Compilers gcc and g++ Network Theory Ltd; Bristol, UK: 2004. [Google Scholar]
  • 14.Haran M, Catherwood JA, Clancy P. Diffusion of group v dopants in silicon-germanium alloys. Applied Physics Letters. 2006;88(17):173502. [Google Scholar]
  • 15.Intel Vector Math Library. 2011 available at: http://software.intel.com/sites/products/documentation/hpc/mkl/vml/vmldata.htm.
  • 16.Liao C, Quinlan DJ, Panas T, de Supinski BR. IWOMP. Springer-Verlag; Berlin, Germany: 2010. A ROSE-based OpenMP 3.0 research compiler supporting multiple runtime libraries; pp. 15–28. [Google Scholar]
  • 17.Loh E, Van De Vanter ML, Votta LG. Can software engineering solve the HPCS problem?. Proceedings of the Second International Workshop on Software Engineering for High Performance Computing System Applications, SE-HPCS’05; ACM, New York, NY, USA. 2005. [Google Scholar]
  • 18.MESA Project. 2010 available at: http://www.cs.colostate.edu/hpc/MESA.
  • 19.Neural Network Software. 2011 available at: http://www.cs.colostate.edu/~anderson/meOther.html.
  • 20.Piñeiro JA, Bruguera JD, Muller JM. Faithful powering computation using table look-up and a fused accumulation tree. ARITH’01: Proceedings of the 15th IEEE Symposium on Computer Arithmetic; Washington, DC, USA, IEEE Computer Society. 2001. p. 40. [Google Scholar]
  • 21.PRMS Project. 2010 available at: http://water.usgs.gov/software/PRMS.
  • 22.Riley J. Writing Fast Programs: A Practical Guide for Scientists and Engineers. Cambridge International Science Publishing; 2006. [Google Scholar]
  • 23.ROSE Project. 2011 available at: http://www.rosecompiler.org/
  • 24.SAXS Project. 2010 available at: http://www.cs.colostate.edu/hpc/SAXS.
  • 25.Sobti K, Deng L, Chakrabarti C, Pitsianis N, Sun X, Kim J, Mangalagiri P, Irick K, Kandemir M, Narayanan V. Efficient function evaluations with lookup tables for structured matrix operations. 2007 IEEE Workshop on Signal Processing Systems; IEEE Computer Society, Washington, DC, USA. 2007. pp. 463–468. [Google Scholar]
  • 26.Squires S, Van De Vanter M, Votta L. Software productivity research in high performance computing. CTWatch Quarterly. 2006;2(4A):52–61. [Google Scholar]
  • 27.Stillinger F, Weber T. Computer simulation of local order in condensed phases of silicon. Physical Review B. 1985;31(8):5262–5271. doi: 10.1103/physrevb.31.5262. [DOI] [PubMed] [Google Scholar]
  • 28.Stine JE, Schulte MJ. The symmetric table addition method for accurate function approximation. J VLSI Signal Process Syst. 1999;21:167–177. [Google Scholar]
  • 29.Tang PTP. Table-driven implementation of the exponential function in IEEE floating-point arithmetic. ACM Transactions on Mathematical Software. 1989;15(2):144–157. [Google Scholar]
  • 30.Tang P-TP. Table-lookup algorithms for elementary functions and their error analysis. Proceedings of the 10th IEEE Symposium on Computer Arithmetic; 1991. [Google Scholar]
  • 31.Wilcox C, Strout M, Bieman J. Mesa: automatic generation of lookup table optimizations. Proceedings of the 4th International Workshop on Multicore Software Engineering, IWMSE’11; ACM, New York, NY, USA. 2011. [Google Scholar]
  • 32.Wohlin C, Runeson P, Host M, Ohlsson M, Regnell B, Wesslen A. Experimentation in Software Engineering: An Introduction. Kluwer Academic; Boston/Dordrecht/London: 2000. [Google Scholar]
  • 33.Zhang Y, Deng L, Yedlapalli P, Muralidhara S, Zhao H, Kandemir M, Chakrabarti C, Pitsianis N, Sun X. A special-purpose compiler for look-up table and code generation for function evaluation. Design, Automation Test in Europe Conference Exhibition (DATE); IEEE Computer Society, Washington, DC, USA. 2010. pp. 1130–1135. [Google Scholar]

RESOURCES