Questions about how to optimise a program's performance, both manually and automatically, e.g. in compilers.
1
vote
3answers
157 views
Fastest Algo to separate the 0s and 1s [closed]
Suppose, I have an array of length 100.
I have 0s at some positions and 1s at some other positions.
What is the fastest method by which I can separate the 0s and 1s, so that we get all the 0s at the ...
3
votes
1answer
197 views
Using Amdahl's law how do you determine execution time after an improvement?
Speeding up a new floating-point unit by 2 slows down data cache accesses by a factor of 2/3 (or a 1.5 slowdown for data caches). If old FP unit took 20% of program's execution time and data cache ...
0
votes
1answer
46 views
Using Loop Dependence analysis for vectorization
How exactly Loop Dependence Analysis helps in vectorization ? Are there any standard rules of safety criterias for parallizing such loops ?
2
votes
1answer
57 views
Benefit of Backward Pass at compile time
We collect most of the information about possible compiler optimizations during forward pass. Is it possible to utilize the information collected in forward pass in a backward pass so as to perform ...
5
votes
1answer
93 views
Are compilers able to detect alternating accesses to arrays and interleave them in memory?
Is it possible to design a compiler which optimizes a loop in which arrays are accessed in alternate fashion? For example like this:
...
5
votes
1answer
67 views
Dataflow framework for global analysis: Why meet, then apply?
In Chapter 9 of the Dragon Book, the authors describe the dataflow framework for global analysis (described also in these slides). In this framework, an analysis is defined by a set of transfer ...
6
votes
1answer
96 views
Micro-optimisation for edit distance computation: is it valid?
On Wikipedia, an implementation for the bottom-up dynamic programming scheme for the edit distance is given. It does not follow the definition completely; inner cells are computed thus:
...
6
votes
0answers
108 views
Optimizing order of graph reduction to minimize memory usage
Having extracted the data-flow in some rather large programs as directed, acyclic graphs, I'd now like to optimize the order of evaluation to minimze the maximum amount of memory used.
That is, given ...