Questions related to improving application performance, this can be range from selection software architecture to selection of algorithms.

learn more… | top users | synonyms

128
votes
45answers
39k views

Does giving a developer a slower development machine result in faster/more efficient code?

Suppose I give my developers a screaming fast machine. WPF-based VS2010 loads very quickly. The developer then creates a WPF or WPF/e application that runs fine on his box, but much slower in the ...
98
votes
11answers
18k views

Should we avoid object creation in Java?

I was told by a colleague that in Java object creation is the most expensive operation you could perform. So I can only conclude to create as few objects as possible. This seems somewhat to defeat ...
80
votes
11answers
20k views

What backs up the claim that C++ can be faster than a JVM or CLR with JIT? [closed]

A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM ...
53
votes
14answers
9k views

Why would it ever be possible for Java to be faster than C++?

Sometimes Java outperforms C++ in benchmarks. Of course, sometimes C++ outperforms. See the following links: http://keithlea.com/javabench/ ...
48
votes
9answers
6k views

Clean readable code vs fast hard to read code. When to cross the line?

When I write code I always try to make my code as clean and readable as possible. Every now and then there comes a time when you need to cross the line and go from nice clean code to slightly uglier ...
48
votes
10answers
3k views

When does “proper” programming no longer matter?

I've been building an android game in my spare time. It's using the libgdx library so quite a bit of the heavy lifting is done for me. While developing, I carelessly selected datatypes for some ...
38
votes
19answers
3k views

Would you purchase hardware with your own money to use at work to do your job better?

At work, I was given a reasonably-spec'ed machine (dual quad 2GHz, 4GB RAM, 160GB 7200RPM drive, Win7), but it was lacking in a few places (HDD / RAM). The IT staff was OK with me replacing hardware ...
37
votes
12answers
2k views

Documentation in OOP should avoid specifying whether or not a “getter” performs any computation?

My school's CS program avoids any mention of object oriented programming, so I've been doing some reading on my own to supplement it -- specifically, Object Oriented Software Construction by Bertrand ...
34
votes
18answers
2k views

How can dev teams prevent slow performance in consumer apps?

When I previously asked what's responsible for slow software, a few answers I've received suggested it was a social and management problem: This isn't a technical problem, it's a marketing and ...
31
votes
5answers
14k views

Performance of Scala compared to Java

First of all I would like to make it clear that this is not a language-X-versus-language-Y question to determine which is better. I have been using Java for a long time and I intend to keep using it. ...
29
votes
16answers
3k 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?
27
votes
8answers
1k views

What causes bad performance in consumer apps? [closed]

My Comcast DVR takes at least three seconds to respond to every remote control keypress, making the simple task of watching television into a frustrating button-mashing experience. My iPhone takes at ...
26
votes
9answers
2k views

Simple vs Complex (but performance efficient) solution - which one to choose and when?

I have been programming for a couple of years and have often found myself at a dilemma. There are two solutions - one is simple one i.e. simple approach, easier to understand and maintain. It ...
25
votes
9answers
2k views

Is template “metaprogramming” in Java a good idea?

There is a source file in a rather large project with several functions that are extremely performance-sensitive (called millions of times per second). In fact, the previous maintainer decided to ...
23
votes
4answers
4k views

How to significantly improve Java performance?

The team over at LMAX have a presentation about how they were able to do 100k TPS at less than 1 ms of latency. They have backed up that presentation with a blog, technical paper (PDF) and the ...
22
votes
5answers
893 views

Multiple database accesses or one massive access?

What is a better approach when it comes to performance and optimal resource utilization: accessing a database multiple times through AJAX to only get the exact information needed when it is needed, or ...
21
votes
14answers
3k views

Why do so many developers believe performance, readability, and maintainability cannot coexist?

While responding to this question, I began to wonder why so many developers believe a good design should not account for performance because doing so would affect readability and/or maintainability. ...
20
votes
7answers
3k views

Writing in C for Performance? [closed]

I know I have quite frequently heard that C typically has a performance advantage over C++. I didn't really think anything else of it until I realized that MSVC doesn't even seem to support the newest ...
20
votes
6answers
3k views

C++ Renaissance - marketing slogan? [duplicate]

Possible Duplicate: What does the latest “C++ Renaissance” mean? Lately, I hear a lot about C++ Renaissance. What is that? C++ is currently undergoing a renaissance. This ...
20
votes
6answers
14k views

Why is quicksort better than other sorting algorithms in practice?

This is a repost of a question on cs.SE by Janoma. Full credits and spoils to him or cs.SE. In a standard algorithms course we are taught that quicksort is O(n log n) on average and O(n²) in the ...
20
votes
8answers
4k views

How to Structure Bonuses for Software Developers? [duplicate]

I am a software developer, and have been asked to define a bonus structure for myself by recommending the metrics that will determine my bonus. I think, once I have defined this bonus structure, there ...
19
votes
7answers
1k views

Does software rot refer primarily to performance, or to messy code?

Wikipedia's definition of software rot focuses on the performance of the software. This is a different usage than I am used to; I had thought of it much more in terms of the cleanliness and design of ...
18
votes
14answers
2k views

Is slower performance of programming languages, really, a bad thing? [closed]

Here's how I see it. There's machine code and it's all that computers needs in order to run something. Computers don't care about programming languages. It doesn't matter to them whether the machine ...
18
votes
7answers
1k views

How do I avoid “Developer's Bad Optimization Intuition”?

I saw on a article that put forth this statement: Developers love to optimize code and with good reason. It is so satisfying and fun. But knowing when to optimize is far more important. ...
18
votes
8answers
6k views

KPI's for Programmers [duplicate]

Do you know any Key Performance Indicators for Developers? What should be measured and monitored?
18
votes
6answers
3k views

Can I do anything to improve performance in VS 2010?

I'm using VS 2010 since we're developing an app in .Net 4 and the performance is driving me crazy. It's mostly bad when I don't view the IDE for a while (such as when I get pulled away for a help desk ...
18
votes
1answer
383 views

Is there any hard data to back up “Human task switches considered harmful”?

Joel Spolsky wrote a famous blog post "Human Task Switches considered harmful". While I agree with the premise and it seems like common sense, I'm wondering if there are any studies or white papers ...
17
votes
15answers
1k views

What simple techniques do you use to improve performance?

I'm talking about the way we write simple routines in order to improve performance without making your code harder to read... for instance, this is the typical for we learned: for(int i = 0; i < ...
17
votes
8answers
7k views

Why Should I Avoid Inline Scripting?

A knowledgeable friend recently looked at a website I helped launch, and commented something like "very cool site, shame about the inline scripting in the source code". I'm definitely in a position ...
16
votes
12answers
6k views

Compilable modern alternatives to C/C++ [closed]

I am considering writing a new software product. Performance will be critical, so I am wary of using an interpreted or language or one that uses a emulation layer (read java). Which leads me to ...
16
votes
4answers
510 views

How bad is it calling println() often than concatenating strings together and calling it once?

I know output to the console is a costly operation. In the interest of code readability sometimes it is nice to call a function to output text twice, rather than having a long string of text as an ...
16
votes
3answers
7k views

How do you do ASP.Net performance testing?

Our team is in need of a performance testing process. We use ASP.Net (both web forms and MVC) and performance testing is not currently built into our projects. We occasionally do some ad-hoc analysis, ...
15
votes
8answers
1k views

Ways to break the “Syndrome of the perfect programmer” [closed]

I am probably not the only one that feel that way. But I have what I tend to call "The syndrome of the perfect programmer" which many might say is the same as being perfectionist but in this case it's ...
15
votes
1answer
8k views

What is the difference between btree and rtree indexing?

I've noticed on MySQLWorkbench that you can choose how to store your indexes before forward engineering your design. The storage types are: BTREE RTREE HASH Researching this, I found some ...
14
votes
22answers
790 views

At What Point Should You Start To Think About Performance?

As I'm building applications I find myself constantly asking if this is best way to perform or implement a certain functionality. Often, I'll post questions on stackoverflow or another forum desiring ...
14
votes
5answers
2k views

Resources on Writing Efficient C Code for Micro-controllers? [closed]

Serious help needed here. I love programming. I've been reading bunch of books(such as K&R) and articles/forums online for C language lately. Even tried looking into Linux code(although, i was ...
14
votes
5answers
3k views

How should developer performance be measured? [duplicate]

In many companies there is a formal procedure of reviewing employees' work. For example, a salesperson can stay she'll sell one million units at the beginning of the year. When she comes up for ...
14
votes
2answers
10k views

Writing low latency Java [closed]

Are there any Java-specific techniques (things which wouldnt apply to C++) for writing low latency code, in Java? I often see Java low latency roles and they ask for experience writing low latency ...
14
votes
4answers
7k views

Why after each restart, my local .NET sites take time to load for the first time? [closed]

I'm developing sites based on .NET platform. I usually deploy these sites on my local IIS, so that I can test them and see their functionality before going live. However, each time I restart windows, ...
13
votes
7answers
521 views

When should I care about performance?

For the longest time in places like Java's IRC channel, SO, and other places I've been told something along the lines of "Worry about how the code looks and its readability/understandability now, and ...
13
votes
5answers
6k 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.) ...
13
votes
5answers
320 views

Should one test for algorithmic complexity? If so, how?

Let's say I am implementing something simple like searching a sorted list/array. The function (in c#) would look similar to: static int FindIndex(int[] sortedList, int i); I could implement and ...
13
votes
2answers
676 views

What makes a large and complex software product slow?

For a reason that is largely irrelevant, I installed Delphi 7 once again in such a long time. I have to say, I was completely blown away - in a way I haven't been for rather a while. This is not how I ...
11
votes
8answers
1k views

Does low latency code sometimes have to be “ugly”?

(This is mainly aimed at those who have specific knowledge of low latency systems, to avoid people just answering with unsubstantiated opinions). Do you feel there is a trade-off between writing ...
11
votes
4answers
302 views

Database design - Store state or compute state every time?

Let's say I have a relational database application and a "user" object and a "message" object. Now I want to show the number of unread messages to this user. What's the best way to archive this? Do I ...
11
votes
6answers
3k views

What makes an application scalable?

I keep seeing in job postings that the applicant must have experience writing "scalable" applications. What makes an application scalable, and how do I know that my code can scale to millions of ...
11
votes
4answers
4k views

Are DDD Aggregates really a good idea in a Web Application?

I'm diving in to Domain Driven Design and some of the concepts i'm coming across make a lot of sense on the surface, but when I think about them more I have to wonder if that's really a good idea. ...
11
votes
4answers
673 views

Does hybrid hard drive improve programming experience? [closed]

I'm tired of how luggish my developments PC is. It's Core2 Duo, 2GB RAM, Seagate ST3500320AS HDD - not the top model, but quite a decent one. Typically I open several copies of Visual Studio 2008, ...
10
votes
4answers
2k views

What is the meaning of the sentence “we wanted it to be compiled so it’s not burning CPU doing the wrong stuff.”

I was reading this article. It has the following paragraph. And did Scala turn out to be fast? Well, what’s your definition of fast? About as fast as Java. It doesn’t have to be as fast as C or ...
10
votes
15answers
785 views

Is it appropriate in a developer's job description to have “error free” as a key output?

As part of a review of all job descriptions, my company has decided to include the following as a key output: website development completed on time, within specification and error free Given ...