Questions related to improving application performance, this can be range from selection software architecture to selection of algorithms.
-1
votes
0answers
20 views
Power of 2 and performance in SQL Server
Many mathematical operation (such as division, multiplication, etc.) are supposed to be computed faster when dealing with power of two numbers (C++, C#?, ...)
For instance 15 * 256 = 0x0e right ...
14
votes
7answers
1k 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 ...
5
votes
4answers
116 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 ...
1
vote
4answers
152 views
Using local variable assigned to return value of a function or using function directly
Is there a difference between this:
MyClass c = getMyClass();
calculate(c.value);
and this:
calculate(getMyClass().value);
in the scope of performance and memory allocation?
0
votes
2answers
91 views
Is there a downside to using AggressiveInlining on simple properties?
I bet I could answer that myself if I knew more about tools to analyze how C#/JIT behaves but since I don't, please bear with me asking.
I have simple code like this :
private SqlMetaData[] ...
0
votes
1answer
58 views
In general: guard pages or heap checks? [on hold]
I would like to know the advantages and disadvantages of using guard pages with bump-pointer allocation versus heap checks with bump-pointer allocation, including performance as a consideration.
In a ...
-2
votes
1answer
77 views
What is the best way to get a method name in runtime?
Here is a little background of my problem: I implemented a singleton logger class which is being called from several projects.
I want to log the name of the class as well as the name of the method ...
1
vote
1answer
103 views
Why did Shannon's outguessing machine beat Hagelbarger's?
I'm reading "Rock Breaks Scissors", which describes two "outguessing machines" built at Bell Labs that try to exploit human non-randomness in the game of matching pennies. There was an outguessing ...
4
votes
0answers
157 views
Why using Fragments?
I have read the documentation and some other questions' threads about this topic and I don't really feel convinced; I don't see clearly the limits of use of this technique.
Fragments are now seen as ...
0
votes
1answer
88 views
Good approach for hundreds of comsumers and big files
I have several files (nearly 1GB each) with data. Data is a string line.
I need to process each of these files with several hundreds of consumers. Each of these consumers does some processing that ...
1
vote
2answers
74 views
Which is more expensive multiple conditional branches or multiple relational expression in a single condition?
Which is more expensive in terms of processing costs
if ( x < 20 && z == "M") {
// statements 3
}
if ( x >= 20 && w && x <= 65) {
// statements 1
}
if( x ...
2
votes
2answers
108 views
How faster could a dedicated chip do sequential squaring modulo operations to break a time crypto capsule?
I'm facing a very real problem and, sadly, I cannot find the answer on my own: I'm hitting my limit as a programmer because my hardware knowledge is not sufficiently advanced at all.
It's an issue ...
1
vote
2answers
155 views
Polling vs events pros and cons in JavaScript
I'm bit of a novice to JavaScript so I've been wondering on positive and negative sides of using polling compared to using events in JavaScript? When does one use one or the other?
By polling I ...
0
votes
2answers
154 views
foreach in list or foreach in list.where [duplicate]
I don't know what to call this question.
This is my example:
foreach (var item in lstItem.Where(item => stock.ItemCode == item.ItemCode))
{
stock.ItemName = item.ItemName;
...
0
votes
2answers
100 views
How should I create object after database insert PHP
I have just been working on a new project and doing things the same way I have for years now. However for the first time, I am constantly thinking about scalability and performance of both the ...
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 ...
0
votes
3answers
154 views
comparison of floating point numbers vs. comparsion of Integers in C [closed]
Does comparison of floating point numbers takes (considerably) longer time than comparison of Integers in C?
I just wrote a C program of heap sort to sort floating point numbers.
I am on ubuntu ...
0
votes
1answer
103 views
Using JDBC to asynchronously read large Oracle table
What strategies can be used to read every row in a large Oracle table, only once, but as fast as possible with JDBC & Java ?
Consider that each row has non-trivial amounts of data (30 columns, ...
1
vote
3answers
437 views
Is there a performance difference between ++x over x++? [duplicate]
Is there a performance difference between using ++x over x++ increment operators?
I've see developers use ++x in loops where I would normally write x++ out of habit.
For example;
for(int x=0; x ...
-4
votes
2answers
327 views
True/false on the left or the right? [duplicate]
I have heard that generally, an expression like:
if (true === $variable)
is faster than:
if ($variable === true)
My question is about the performance, not the readability. Questions such as this ...
1
vote
1answer
171 views
alternate approach of binary serialization/de-serialization
Is it possible to convert a list of object directly to byte[] (and vice versa) to gain performance (by avoiding serialization/de-serialization)?
What I have in mind is that a list is somewhere in ...
0
votes
1answer
87 views
Performance of One API vs Multiple API's
I was having a conversation with a colleague and although my opinion makes sense to me, I wasn't able to back it up. I'm in the process of creating an API that will be hit hundreds of thousands of ...
0
votes
0answers
20 views
How do I implement the OpsDB from Release It! by Michael T Nygard
I have recently been reading the Release It! book by Michael T Nygard.In the book he talks about Implementing an OpsDB to manage and record performance statistics of applications.
Has anyone ...
0
votes
2answers
213 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 ...
0
votes
7answers
741 views
Is there any performance benefit in checking the item count prior to executing a foreach loop?
I saw this in code and was wondering if there is any performance benefit to checking the item count prior to looping:
if (SqlParams.Count > 0)
foreach (var prm in SqlParams)
...
1
vote
5answers
376 views
What are the advantages of recursion compared to iteration? [duplicate]
I'm trying to understand when is preferred to use recursion rather than iteration.
Actually I've encountered recursion only in Javascript but never in Python. I imagine that recursion should be used ...
0
votes
1answer
211 views
ASP.net performance code behind vs app_code
I am wondering about performance of a web site/application when there is code in the code behind files rather than when the code is moved to separate files in the App_Code folder.
My understanding ...
3
votes
1answer
126 views
Should a stored proc try to do more, in the attempt to avoid php mysql back and forth overhead
I have a REST architecture, running PHP on the server side which store
and query a Mysql database.
I am re-evaluating one architecture design decision:
DECISION to re-evaluate:
In an attempt to ...
0
votes
0answers
54 views
Where should I declare variables used in for-loops in Java for maximum efficiency? [duplicate]
I'm talking hypothetically but I'll use an example of what I worked on in a programming class a while ago. There's a better way to actually perform the operation, but that's not the point.
An example ...
1
vote
1answer
32 views
Performance and data retrieving
I'm currently developing a mobile application in Objective C for iOS devices. While doing the application I reach the point where I have to retrieve data from a database and show it on a table (the ...
0
votes
1answer
60 views
Whats a good structure to save and retrieve locations of images?
I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid.
I also got lots of related files, which are ...
0
votes
0answers
22 views
Request size sweet spot?
In a client-server situation, a way to batch requests to the server, ideally to batch all requests for one page (on page load), to get the entire model view for the page and all resources in one HTTP ...
1
vote
0answers
82 views
How to identify performance bottlenecks in your software [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 ...
1
vote
5answers
382 views
Which statement performs best?
I was faced with this question by my team leader.
Statement 1 (written by me):
lnkbtn1.visible = lnkbtn2.visible = lnkbtn.visible = false;
Statement 2 (written by my team leader):
...
0
votes
0answers
35 views
Get user specific data client or server side
Websites that have membership systems and shopping carts usually show different information on the page depending on whether the user is signed in or not, whether there are items in the cart, etc etc.
...
2
votes
1answer
108 views
Will using multiple recordsets in one database request be more efficient?
I am redeveloping an old ecommerce website which is currently written in C# ASP.NET 2.0.
Because this is a reasonably high volume website and has suffered performance issues I want to develop in the ...
0
votes
3answers
124 views
Indirection: Readability vs Performance [closed]
(I see there are a lot of similar questions, but answers are not really what I am interested at.)
The thing that is bugging me is indirection. If I'm writing something, I do tend to inline as much ...
0
votes
1answer
41 views
Mail Server Caching
I'm currently working on a web mail client. When a user logs in, I'm fetching all the mails from the INBOX from the beginning of time. As expected this is pretty darn slow. I'm planning to implement ...
2
votes
3answers
81 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 ...
0
votes
3answers
122 views
Advantage of monitoring file change using Windows API rather than manually
I developed a Windows software about an year ago. Part of it was to monitor few configuration files for manual changes by user and if any of these change restart a particular service.
So, I used the ...
3
votes
1answer
297 views
Hadoop and Object Reuse, Why?
In Hadoop, objects passed to reducers are reused. This is extremely surprising and hard to track down if you're not expecting it. Furthermore, the original tracker for this "feature" doesn't offer any ...
3
votes
3answers
320 views
Is Python suitable for a statistical modeling application looking over thousands of past events?
I'm currently working on a project with a partner where we analyze large datasets of past sporting events. There are approximately 30,000 events per year and we have historical data for five years. ...
0
votes
1answer
190 views
Most efficient multiple condition IF statement
I am using a function to compare over 100 variables inside of classes to each other an am curious if one method of comparing multiple condition statements is more efficient than another. I am ...
0
votes
3answers
626 views
Super Fast File Storage Engine
I basically have one big gigantic table (about 1.000.000.000.000 records) in a database with these fields:
id, block_id, record
id is unique, block_id is not unique, it contains about 10k (max) ...
0
votes
1answer
92 views
How to convey your approach is faster than the built-in, alternative approaches? [closed]
Imagine you have a tool that's much faster than another one (built-in, alternative). You want to mention this in the description of the tool so people can see the point of your tool existing.
By ...
1
vote
0answers
158 views
How many Angular Controllers and/or Directives is too many?
I'm building a large, editable data table with angular, and I'm trying to figure out what the best practice is.
The table will be a couple of hundred rows, with a couple of dozen columns, so upwards ...
1
vote
3answers
2k views
C++ Performance vs. Java/C# [closed]
My understanding is that C/C++ produces native code to run on a particular machine architecture. Conversely, languages like Java and C# run on top of a virtual machine which abstracts away the native ...
0
votes
1answer
277 views
Console Application vs GUI? [closed]
I'm trying to develop a minimal MP3 player with some cool but light features. It is so simple that it doesn't matter if it is console application or not.
Since my purpose is to consume the sources as ...
0
votes
0answers
386 views
Best method for async initialization of view model in MVVM pattern (WPF)
I'm working on a business application (C#, WPF, EF, MVVM). I need to load a bunch of items from database, create view models for them and put them in a window. Is there a way to create the view model ...
7
votes
5answers
895 views
Why did the team at LMAX use Java and design the architecture to avoid GC at all cost?
Why did the team at LMAX design the LMAX Disruptor in Java but all their design points to minimizing GC use? If one does not want to have GC run then why use a garbage collected language?
Their ...