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

learn more… | top users | synonyms (1)

7
votes
3answers
1k views

Foreach loop and variable initialization

Is there a difference between these two versions of code? foreach (var thing in things) { int i = thing.number; // code using 'i' // pay no attention to the uselessness of 'i' } int ...
-2
votes
1answer
63 views

Duplicate code to avoid performance decrease due to function calls? [on hold]

I have a simple list in Java that I need to search using one of two methods. The first method simply returns the position in the list of the first matching element. The second filters out any elements ...
0
votes
1answer
125 views

Why do successive iOS versions take longer to run the same task on the same hardware?

Updating the iOS version on an old iPhone tends to make basic operations like startup, placing calls, and checking settings take longer. The change from eg iOS 7 to 8 on an iPhone 4S has a very ...
3
votes
6answers
260 views

How efficient is malloc and how do implementations differ?

If I use malloc, does malloc always use the same algorithm regardless of what it is allocating or does it look at the data and select an appriopriate algorithm? Can we make malloc faster or smarter ...
4
votes
2answers
76 views

How to facilitate thread-safe access to large set of shared variables?

I have 2 sets--inputs and outputs--of 70 32-bit integer variables and 70 bools (140 vars altogether). These need to be accessed and modified from 3 threads. What is an appropriate design pattern to ...
5
votes
6answers
569 views

How much do function calls impact performance?

Extracting functionality into methods or functions is a must for code modularity, readability and interoperability, especially in OOP. But this means more functions calls will be made. How does ...
2
votes
4answers
6k views

Exporting huge data into XLS in a web application [closed]

I am developing a web application in Java/J2EE, in which I have export functionality. I have used Jasper for the same. The issue is when trying to export a huge set of data it is consuming a lot of ...
2
votes
1answer
81 views

Optimizing the exponential smoothing of a big array

I have a large set of values (let's say 1M entries) where I need to apply an exponential smoothing algorithm, but only incrementing one value at a time (all others decay to zero). The trivial ...
2
votes
3answers
265 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 ...
3
votes
5answers
105 views

Use Exceptions for control flow in order to increase performance?

I add a lot of elements to a list of lists. If the list of lists my element should be saved to, does not exist yet, I handle this by catching an exception and adding a new list to my list of lists. ...
27
votes
11answers
2k views

Did a gradual shift in methodology of writing code affect system performance? And Should I care?

Lest you be confused by what's to follow, here is the driving idea behind the question: I always intended the question to be what it is. I may not have articulated it well originally. But intent ...
7
votes
2answers
98 views

Strategies for investigating performance of an ASP.NET web application running under .NET 4

I'm trying to compare the performance of an application that has recently been converted from .NET2 to .NET4. From my perfomance tests it seems that although page response times are generally a bit ...
-1
votes
5answers
505 views

How to ascertain from the users if performance tuning has had the desired effect [closed]

So you've made some code changes that should hopefully speed up some part of an application. But there is just one problem - you don't know how it will perform in live. Different networks, different ...
0
votes
1answer
147 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 ...
172
votes
13answers
50k 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 ...
1
vote
4answers
112 views

is stored procedure having multiple UNION efficient than running all SQL's in parallel?

I have below in my stored proc if then SELECT TABLE1.COLUMN1,TABLE1.COLUMN2,TABLE1.COLUMN3,TABLE1.COLUMN4 FROM TABLE1,TABLE2 where criteria1 (covers functionality 1) UNION SELECT ...
4
votes
0answers
55 views

Estimate if benchmark sampling difference is significative

In order to estimate the fastest function in various cases in a non fully deterministic context, I'm running an experiment calling one or the other at random and recording the duration of the ...
0
votes
2answers
83 views

JSON or XML or other - most time efficient for largely “read” of structured data

Considering that using a relational DB or other hierarchical or such databases is not an option, looking for the alternative approach using a simple (but very fast, efficient, distributed KV-store). ...
25
votes
11answers
2k views

How to deal with misconceptions about “premature optimization is the root of all evil”?

I've encountered many people who are dogmatically against anything which can be considered "optimization" in the general English-language sense of the word, and they very often quote verbatim the ...
-1
votes
2answers
90 views

Does sql use hastables for indexes? [closed]

Are there other ways of indexing?, Which are the more used? Does sql have an standard for indexes, it uses hash tables?
0
votes
0answers
19 views

Finding performance (network perspective) differences between mobile websites and their corresponding applications?

I'm researching performance differences when using an application, compared to its mobile website counterpart. To my help I looked into what other people define as performance(since it's a broad term) ...
2
votes
0answers
69 views

Maximising data processing speed: in-memory or write to db first?

Currently working on a system which allows users to upload data files, which we then "clean" (i.e. process in various ways). Speed of processing and return to the user is an important consideration, ...
1
vote
1answer
78 views

Clairvoyance in caching - optimal strategies?

This question relates to the question here, but I'll generalise it so that you can answer effectively without reading all of that. Context: Imagine you had a large set of data greater than your ...
2
votes
1answer
67 views

Caching in '3D' - data-structures and octree recursion - hrrm!

The Situation: I have 68GB of data that is conceptually realized as a 3D matrix of 8-bit values with dimension 4096*4096*4096. I need to access multiple sections of this data for processing in a ...
21
votes
5answers
13k 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.) ...
14
votes
6answers
645 views

Do changes in performance violate the Liskov Substitution Principle?

Say I have: interface Thing { GetThing(); } class FastThing : Thing { public int GetThing() { return 1; } } class SlowThing : Thing { public int GetThing() { ...
1
vote
1answer
60 views

«Heavy» object initialization: within each thread or outside and then pass it to the threads as parameter?

Let say there is an array of strings, I have to process. I'm using a «heavy» third-part object which gets the string and performs its analysis. In order to optimize a performance, I create a number of ...
-7
votes
1answer
177 views

Java: Why's this For-Loop thousands of times slower?

So I have a simple method I'm calling millions of times a second, and I noticed that it was taking 16% of all processing time!! The offensive routine is as follows: public void placeHolder(){ ...
3
votes
3answers
256 views

Iteratively improve software architecture & quality in an agile process?

Or to put it another way how to ensure that architecture or quality doesn't suffer, doing agile. Some of the understandings in handling architecture in agile are below(generally applies to testing as ...
4
votes
1answer
76 views

How do you handle Performance tasks in Agile?

How is the Agile process affected if a stakeholder requests that a specific operation in the software need to perform better? This could mean that it runs very slow for a customer's needs (even with ...
0
votes
1answer
60 views

Does variable type specification lead to any performance difference?

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 and a few variable ones taken from an element's ...
1
vote
0answers
68 views

Guaranteed message sending for messages of different priority for different modules

We have created a message que system using priority messages. The idea behind this is as follows: We have a list of clients. All clients know if (and what kind of priority) messages they have ...
-1
votes
4answers
179 views

Nested For Loops JavaScript

I have an app which gets data from the database (MongoDB) in JSON format. The returned data contains nested arrays and I want to access the values in the nested arrays. The returned JSON format looks ...
8
votes
2answers
169 views

Why does expressing calculations as matrix multiplications make them faster?

In Google's MNist tutorial using TensorFlow, a calculation is exhibited in which one step is equivalent to multiplying a matrix by a vector. Google first shows a picture in which each numeric ...
0
votes
1answer
264 views

How could this be considered performant code?

I came across this (Java) code yesterday and can't figure out why someone would have done this in any language. In what scenario, language, paranoid delusion would "removing" values from an ...
6
votes
3answers
2k views

Is the Entity Framework appropriate when all you do is insert records in bulk?

My department develops software to migrate databases for our customers from their old CRM software to ours. In this process we could be inserting up do millions of rows, processed one at a time as we ...
1
vote
4answers
321 views

What is the ninja performance gap, why is it so large, and how can we overcome it?

According to this abstract: The "Ninja gap" [...] is the performance gap between naively written C/C++ code that is parallelism unaware (often serial) and best-optimized code on modern ...
3
votes
1answer
319 views

Bad c++ code design? [closed]

This is bothering me a long time. I feel like I am doing mistakes on the code design relative to the performance. I never had any teacher to indicate my mistakes so its hard to me to make it right in ...
6
votes
4answers
2k views

Why scalability issues cannot be solved by more servers ?

I know that big websites suffer from scalability issues and I guess that more servers (hardware) can help to handle scalabililty issues but I see that big websites are stuck about scalability even if ...
1
vote
0answers
24 views

Distributed Design to Speed Up Video Processing

Currently I have one web server running Django, which takes a series of images from a user, uploads them to an Amazon S3 bucket, and finally calls an Amazon Lambda instance, which runs a python script ...
1
vote
0answers
41 views

Best way to handle multiple proxies and HTTP requests

I need to develop a solution for a problem that requires multiple HTTP/ Socks proxies for different HTTP requests. The solution needs to be cross platform. Here is my idea how it needs to work: ...
1
vote
2answers
96 views

Load to list in one loop and then process list in another or do it all at once

I have a dataset full of rows that I must initialize into myclass and then process. I am currently looping through each row in the dataset, initializing a new instance of myclass, then adding that ...
2
votes
3answers
135 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
133 views

Huge long addition overhead compared to Native call?

A run a simple test JDK 1.7.0_45 (Windows 7, 64bit): Test 1: long start = System.nanoTime(); for (int i=0; i < 1000000; i++) { System.currentTimeMillis(); } elapsed = System.nanoTime() - ...
0
votes
0answers
84 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 ...
4
votes
0answers
89 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
104 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 ...
6
votes
1answer
359 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 ...
102
votes
11answers
33k 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 ...
6
votes
5answers
554 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 ...