Tagged Questions
Optimization is the process of improving an existing program to make it work more efficiently or/and using less resources.
0
votes
1answer
101 views
What are some efficient ways to set up my environment when working on a remote site?
Hello fellow Programmers,
I am still a relatively new programmer and have recently gotten my first on-campus programming position. I am the sole dev responsible for 8 domains as well as 3 small sized ...
1
vote
1answer
31 views
Optimising news fetching
I have a web scraper for scraping news from different sources in wp7. My current appraoch for doing this is:
load newspapers information from xml file.
go to the specified sections and fetch the ...
0
votes
1answer
156 views
How small is the footprint of a small C compiler?
This week I could optimize using a reduced C library that allowed a drastic shrinkage in code size - from about 60 K to about 6 K and then we could load the code in the 8 K on-chip memory of an FPGA ...
4
votes
2answers
129 views
Optimizing code generation for expressions in a compiler
I don't know if this question has a simple answer or not, but I just have to ask.
I'm reading this tutorial (I don't know if this is a well-known series, but it's name is 'Let's build a compiler!' by ...
4
votes
2answers
388 views
Larger Code is Still Faster
When compiling C code with gcc, there are compiler optimizations, some that limit code size and others create fast code.
From the -S flag, I see that the -O2/03 generates more assembly than the -Os ...
7
votes
4answers
355 views
How to find bottlenecks in an application? [duplicate]
I'm building an application with lots of components, a lot of which are third-party so I only know what I can get from their documentation.
From time to time, by pure luck, I find out one of these ...
3
votes
1answer
165 views
Does setting a function public affect the C# compiler's ability to inline the function as an optimization?
This could be either for the .NET or Mono compilers.
I know that under certain conditions the compiler can inline functions (e.g. small, single call site, etc.) as an optimization. However, if the ...
1
vote
1answer
83 views
Optimization of time-varying parameters
I need to find an optimal set of "n" parameter values that minimize an objective function (a 2-hr simulation of a system). I have looked at genetic algorithm and simulated annealing methods, but was ...
-4
votes
4answers
202 views
Which if statement requires less computation?
I have
if (!b && c || a && c)
//do action a
else
//...
Due to some internal relationship between a, b, and c. !b && c || a && c is proved to be equivalent to (! ...
3
votes
1answer
121 views
Algorithm to arrange objects so that the total length of edges between them is minimized?
We are given a list of edges between a set of N vertices. There are atmost three edges joining a vertex. We have to arrange all the vertices on a straight line with the positions numbered from 1 to N ...
0
votes
2answers
242 views
What is the exact syntax of inline?
CASE 1 (Definition and declaration in same source file)
Suppose both my prototype and definition of global function is in .cpp file. Where should I write inline keyword to make compiler know?
In ...
1
vote
1answer
103 views
What are some algorithms that can assist with reservation time scheduling?
Here's the gist of the problem: There are multiple service providers who each have their own schedules of availability. There are multiple customers who seek their services. Customers need to be able ...
1
vote
2answers
77 views
Efficient way of evaluating an array of strings then add to an array in Ruby
I am looking for an efficient way of evaluating an array of strings against a series of rules and then adding them to another array.
For example I have an array of strings:
something
a
1234
#gohere
...
2
votes
1answer
177 views
Benefits of setting PHP memory_limit to lower value for specific PHP script?
I need to execute just few lines of PHP code on every single page of my website. This PHP code does not require more than 4MB memory. That is why i want to allocate just 4MB memory to all pages by ...
3
votes
5answers
234 views
Premature optimization in deciding how to optimize?
We have a class that has been properly identified for optimization. We've done the profiling and testing, and it's a problem.
Now we have two possible approaches for optimizing this class:
There is ...