Optimization is the process of improving an existing program to make it work more efficiently or/and using less resources.

learn more… | top users | synonyms (1)

7
votes
8answers
1k views

Is premature optimization always bad? [duplicate]

I work in a small sized software/web development company. I have gotten into the habit of optimizing prematurely, I know it is evil and promotes bad code, but I have been working at this firm for a ...
30
votes
16answers
4k views

Should you sacrifice code readability with how efficient code is? [closed]

Should you sacrifice code readability with how efficient code is? e.g. 3 lines of code into 1 line. I read in Code Craft by Pete Goodliffe that readability is key. Your thoughts?
2
votes
3answers
2k views

How do you find the most optimized way to write code? [closed]

In my programming career, I have written Java and PHP, Javascript and a little Ruby. I am not a CS major but got into web development from a more broad Internet Professional associates degree, which ...
47
votes
11answers
2k views

When is optimization not premature and therefore not evil?

"Premature optimization is root of all evil" is something almost all of us have heard/read. What I am curious what kind of optimization not premature, i.e. at every stage of software development (high ...
4
votes
2answers
132 views

How much configurability to give to users regarding concurrency?

This question is a narrowing-down of these related questions: How much effort should we spend to programming for multiple cores? Concurrency: How do you approach the design and debug the ...
17
votes
5answers
9k views

JIT compiler for C, C++, and the likes

Is there any just-in-time compiler out there for compiled languages, such as C and C++? (The first names that come to mind are Clang and LLVM! But I don't think they currently support it.) ...
8
votes
2answers
411 views

How big sites scale up and optimize to massive traffic? [closed]

How do sites like Facebook and Twitter optimize their sites for massive traffic. Aside from spending big bucks on getting the best servers, what can be optimized in your code to accommodate massive ...
17
votes
18answers
754 views

What do you optimize for? [closed]

Generally speaking, what type of optimizations do you typically slant yourself towards when designing software? Are you the type that prefers to optimize your design for Development time (i.e., ...
10
votes
2answers
1k views

Compiler optimization examples [closed]

I'd like to see (good) examples of optimizations performed by compilers (static and JIT). Why? To learn what we don't have to optimize ourselves (often leading to better code) To be amazed
14
votes
7answers
276 views

What optimizations are premature? [duplicate]

I've been here for nearly a month and it seems that people have a tendency to be eager to use the "Premature Optimization is the root of all evil" argument as soon as someone mentions efficiency. ...
92
votes
16answers
18k views

Is premature optimization really the root of all evil?

A colleague of mine today committed a class called ThreadLocalFormat, which basically moved instances of Java Format classes into a thread local, since they are not thread safe and "relatively ...