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

learn more… | top users | synonyms (1)

-1
votes
1answer
32 views

Is denormalising a data structure essentially a code optimisation, to which the normal rules apply?

One of Bloch's Effective Java items 55: Optimize judiciously extends Jackson's rules on optimization: Rule no. 1: Don't optimise! Rule no. 2 (for experts): Don't optimise yet! Extra ...
0
votes
1answer
32 views

Does variable type specification leads to any performance difference?

This question sits in my head for a long time now. Let's say I have a very long method which basically creates a responsive and resizable layout for a user interface by using a few fixed values, ...
0
votes
1answer
104 views

Finite Element Shader

I am working on a geometric wrapper for a space jet exhaust impingement solver. A key part of the solution is determining what the jet can "see" and therefore hit. My model is grouped with nodes or ...
0
votes
0answers
49 views

Options for implementing database and programming logic for statistics application?

I am implementing a statistics driven web application. The statistics relate to sporting events. Right now I have a postgresql database with a table that holds a row for each match. This is a ...
3
votes
0answers
23 views

Using mysql 5.7 Json Columns for EAV

I am developing an e-commerce product and I have been able to implement all functionality and am left with allowing users to create additional attributes for a product. Right Now I have two options. ...
0
votes
0answers
95 views

Advice on program performance after changes

So, the situation is like this: For the past two years, I have implemented a class in c# which is used to filter different fields from different tables in database (SQL), for reporting purposes. Now ...
5
votes
1answer
316 views

Does unused code affects the assembly after startup (Memory for example)?

Disclaimer: I come from a PHP background. In PHP, I could have thousands files, which are never loaded, if not needed, due to the autoloader feature (If some code is needed, it would be loaded) How ...
97
votes
11answers
31k 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 ...
5
votes
5answers
469 views

How to design a complex REST API considering DB performance?

I've been following some tutorials on how to design REST APIs, but I still have some big questions marks. All these tutorials show resources with relatively simple hierarchies, and I would like to ...
38
votes
19answers
4k views

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

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 ...
1
vote
1answer
161 views

Design periodic batch notification system

Problem: I am trying to design a system which takes requests from customers in real time and log them in a database. For example - request to purchase an item. The customer then gets a unique ...
2
votes
1answer
105 views

Improving sampling algorithm

I am having a bit of trouble designing a new feature at the moment. It is part of a resource management system. I was wondering if anyone has experience doing anything similar. I'll try to explain: ...
6
votes
1answer
627 views

How to see what parts of your code are run most often?

I would like to be able to see what code in thousands of lines of source code is run most often and takes the longest. The purpose of this would be for optimization. Being able to see what parts of ...
1
vote
0answers
31 views

How can I test for performance issues in a specific piece of code? [duplicate]

I've inherited a problem from a programmer that isn't with our group anymore - a piece of our application suffers from performance issues under a particular set of circumstances. I can replicate ...
6
votes
6answers
239 views

Should I always store parsed data in database before manipulating?

I am about to start a new project which involves taking an excel file, parsing the data (php-excel-reader) and then using the parsed values in a HTML email. My question is pretty simple. Is it better ...
2
votes
1answer
114 views

How are objects treated in an anonymous inner class?

Lets take this for example... entryText.addTextChangedListener(new TextWatcher() { TextView wordCount = (TextView) findViewById(R.id.wordCount); TextView charCount = (TextView) ...
11
votes
5answers
6k views

Java Heap Allocation Faster than C++

I already posted this question on SO and it did ok. It was unfortunately closed though(only needs one vote to reopen) but someone suggested I post it on here as it is a better fit so the following is ...
14
votes
3answers
1k views

What makes a large and complex software product slow? [closed]

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 ...
9
votes
8answers
2k views

Is Java much harder to “tweak” for performance compared with C/C++? [closed]

Does the "magic" of the JVM hinder the influence a programmer has over micro-optimisations in Java? I recently read in C++ sometimes the ordering of the data members can provide optimizations ...
10
votes
10answers
4k views

Does object-orientation really affect algorithm performance?

Object orientation has helped me a lot in implementing many algorithms. However, object-oriented languages sometimes guide you in "straightforward" approach and I doubt if this approach is always a ...
5
votes
4answers
1k views

Memory management for fast message passing between threads in C++

Suppose there are two threads, which communicate by asynchronously sending data messages to each other. Each thread has some kind of message queue. My question is very low level: What can be expected ...
4
votes
6answers
226 views

Class design, responsibility granulation, efficiency and performance

I am in a design dilemma. I have a set of data that can be interpreted in numerous ways, but I cannot really decide how finely grained should it be. To illustrate it with some simple code: class Base ...
4
votes
3answers
138 views

Is storing data directly in a list node better than storing a pointer to data?

Suppose we have two different doubly-linked list structures: One has content of the node embedded directly in the node: struct Content { // some stuff }; struct Node { struct Node *next; ...
4
votes
1answer
131 views

What is the most efficient way to implement a RESTful client app?

I am working on a web application for ranking some products based on some factors. The user send a search query to 5 restful webservices which by their turn send a response in a JSON format and ...
-1
votes
1answer
78 views

Speeding up appending text in C# [duplicate]

I'm trying to append text to a large amount of strings (in the thousands), and also do some other string manipulations. However, I have about 60 lines of if/else and string appending and it takes ...
41
votes
6answers
3k views

Does immutability hurt performance in JavaScript?

There seems to be a recent trend in JavaScript towards treating data structures as immutable. For example, if you need to change a single property of an object, better to just create a whole new ...
9
votes
10answers
524 views

How often is software speed evident in the eyes of customers?

In theory, customers should be able to feel the software performance improvements from first-hand experience. In practice, sometimes the improvements are not noticible enough, such that in order to ...
20
votes
11answers
2k 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 ...
19
votes
9answers
31k views

What is the point of using lists over vectors, in C++?

I've run 3 different experiments involving C++ lists and vectors. Those with vectors proved more efficient, even when a lot of insertions in the middle were involved. Hence the question: in which ...
2
votes
2answers
325 views

Improving the efficiency of containers with dynamically allocated objects

This is not strictly related to C++ but its type system serves to illustrate the problem well. Assume: We have a generic template Container<T> (such as a std::vector<T>) which stores an ...
1
vote
2answers
292 views

Can this argument be enough?

We have two C++ classes named Important and Small The class Small use a few methods and attributes from the class Important, but not all. Since our application is performance critical, instead of ...
5
votes
5answers
294 views

Can a pimpl variation be implemented without any performance penalty?

One of the issues of pimpl is the performance penalty of using it (additional memory allocation, non-contiguous data members, additional indirections, etc..). I would like to propose a variation on ...
0
votes
5answers
1k views

Read K&R before learning low latency C++? [closed]

I have never really done a large amount of C programming but am in the middle of teaching myself low latency C++. Would it do more harm than good to read the K&R C programming book? I am a bit ...
9
votes
4answers
5k views

Data Oriented Design - impractical with more than 1-2 structure “members”?

The usual example of Data Oriented Design is with the Ball structure: struct Ball { float Radius; float XYZ[3]; }; and then they make some algorithm that iterates a std::vector<Ball> ...
12
votes
6answers
1k views

In general, is it worth using virtual functions to avoid branching?

There seems to be rough equivalents of instructions to equate to the cost of a branch miss virtual functions have a similar tradeoff: instruction vs. data cache miss optimization barrier If ...
1
vote
3answers
4k views

Most Efficient way to Compute the sum of divisors of N (1 ≤ N ≤ 1 000 000 000)

I want to write a code which computes the sum of divisors of a number N(1 ≤ N ≤ 1 000 000 000), excluding the number itself. However, I need an efficient way to do it. It suppose to print the answer ...
1
vote
2answers
539 views

How to measure algorithm accuracy?

I have a few optimization algorithms (for finding function minimum) and I'd like to check how good they are. Suppose I build test cases and compare the actual results to theoretical ones. What ...
3
votes
1answer
138 views

Best practice for Restful API that perform heavy calculations (Image Processing)

We are currently developing an image processing restful api. Server performs some CPU-heavy computations image processing upon request and return the image to the client. We want to make this a ...
3
votes
0answers
88 views

Tips for optimizing javascript code. a year's worth of Dates

I am playing around with the date object, i made a function that generates a bunch of dates, and applies some function on each date. For a month's worth, it is fine about 2.5ms on my pc, ff and ...
-1
votes
1answer
50 views

When > apply a performance and memory profiler? [closed]

Based on your experience, when do you need to perform a performance and memory profiler for a web development project in C#? Today, Im newbie in performance and memory profiling.
15
votes
0answers
11k views

How do you do ASP.Net performance testing? [closed]

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, ...
8
votes
3answers
438 views

Would it be better to have extra checks, or would it be a waste of time? [duplicate]

In your opinion, do you think it is a waste of time to make checks that you know there is no possible way of it being there/not being there, or would you just put it there just in case there is a bug ...
2
votes
0answers
65 views

Dealing with big data [closed]

I am on a project dealing with a lot of data in the form of images and videos (Data related to wind engineering). My requirement is to build a predictive algorithm based on the data I have. I have ...
5
votes
3answers
203 views

To find the oldest/newest element in a heap

I want to find the oldest/newest element added into a heap of size k. At any given point of time if I have to find say the oldest element in the heap is there any approach with O(1) space and O(1) ...
0
votes
1answer
143 views

Low cost exceptions implementation using metaprogramming [closed]

(preface - boring stuff, feel free to skip down to the implementation details) I need to provide exception handling to a language I am working on. It "compiles" to a subset of C, and since I don't ...
130
votes
31answers
13k views

Is micro-optimisation important when coding?

I recently asked a question on Stack Overflow to find out why isset() was faster than strlen() in PHP. This raised questions around the importance of readable code and whether performance improvements ...
1
vote
1answer
112 views

How to improve performance for serializing and deserializing a large object graph?

I have a large object graph in .NET (F# as it happens) that I need to persist to disk and then will load again periodically for use in a calculation. The performance of deserializing is more ...
27
votes
4answers
3k views

Is there a performance benefit to using the method reference syntax instead of lambda syntax in Java 8?

Do method references skip the overhead of the lambda wrapper? Might they in the future? According to the Java Tutorial on Method References: Sometimes... a lambda expression does nothing but ...
1
vote
0answers
87 views

Best datastructure to use

I am using Amazon's dynamodb nosql database and as a result I need to think of some ways to do certain operations to fit into their limits (e.g 4k item limit, can't combine small items into the same ...
3
votes
2answers
65 views

Stored Procedure performance

I'm working on upgrading an application written by a former developer at my work and I've been converting all the SQL queries in the code into Stored Procedures. I'm doing this with the idea that it ...