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

learn more… | top users | synonyms

2
votes
1answer
35 views

How do hybrid interpreter-JIT compilers work?

Chrome's V8 compiler, the Java HotSpot compiler, and many more have multiple tiers of interpretation and compilation. A function starts off as interpreted in HotSpot and then, if it is run often ...
2
votes
0answers
30 views

Kth selection routine - Floyd Algorithm 489

I have recently come across a promising Kth selection routine that reportedly outperforms quickselect the Floyd, Rivest Select routine. This Wikipedia article provides a pseudocode version which I ...
3
votes
5answers
145 views

Should I use BLOB or Tables for storing large data?

Problem Currently investigating a solution to improve the performance of a web application. The application works well for small projects, but faces performance issues in the UI when working with ...
-2
votes
1answer
75 views

Java - Concept question: LinkedHashMaps vs POJOs?

EDIT: I'm just going to ask a single question instead of presenting a problem and asking for advice on a specific design decision in the solution. Given a batch of data from a database, collected ...
-2
votes
0answers
24 views

ASP.NET: Testing performance and memory Usage [on hold]

I am developing a website that have to be prepared for supporing a lot of concurrent users, so i need to test that. I would like to see what happen with the CPU consuming, Memory Usage, etc, when ...
2
votes
1answer
27 views

Truncating HTML content at specific content blocks

I have HTML content in my DB and I would like to present a list of these individual items but truncate each of them so they're not fully displayed. I would like to keep truncated items ...
3
votes
1answer
268 views

Why is iterating through List<T> more expensive than iterating through Array in .NET?

According to the answers in this post, List<T> is backed by an Array. According to this article, list iteration is considerably slower than array iteration. If Lists are arrays 'under the ...
4
votes
1answer
194 views

Is Collection.stream().filter().forEach() inefficient compared to a standard for each loop?

IntelliJ IDEA recommended to me just now to replace the following for-each loop with a Java 8 "forEach" call: for (Object o : objects) { if (o instanceof SomeObject) { ...
2
votes
0answers
50 views

Argument over performance using Convert.ChangeType in Web Applications [duplicate]

A debate has been going on at work about using Convert.ChangeType. A couple of fundamental assumptions to this discussion are delineated below: 1. The discussion is within the context of web ...
2
votes
0answers
57 views

Heavy-duty use of C++ initializer_lists of containers [closed]

I've proposed and developed an optimization bringing move semantics to std::initializer_list. It seems like a slam dunk, but some on the committee saw the proposal as a waste of time, never mind ...
4
votes
1answer
230 views

How does modulus work?

I am not asking asking how the mathematical concept of modulus works, or how 20 % 3 == 2 I understand this fine. I'm more curious how the compiler/interpreter determines this. I can think of a very ...
5
votes
2answers
106 views

When designing a replacement application, how can I compare its performance to the original, if there are no existing statistics?

I don't believe there are any performance statistics kept for the application I'm being asked to replace, and don't want to ask the individuals doing the work to manually record things like how long ...
7
votes
3answers
479 views

Enterprise software: Where should the code go? [duplicate]

I recently went for an interview with a software company that claims to write enterprise level software. During the interview, the interviewer remarked that its better to use the database simply to ...
0
votes
3answers
191 views

Compile-time vs. run-time configuration

I'm starting new project and need to decide on how to handle configuration. I recently run into suckless project. While it has its own issues, I really liked its approach to configuration - just a ...
1
vote
4answers
163 views

List comparing techniques for faster performance

I need to cross names from two lists, and find all occurrences of one name in the other. The lists are too big, one have 50k elements and the other 400k. For a small list I would use two foreach ...
2
votes
3answers
189 views

fast, say O(log2(N)), sliding median algorithm

So I know how to do a fast O(log2(N)) sliding max or sliding min algorithm. Brookes: "Algorithms for Max and Min Filters with Improved Worst-Case Performance" IEEE TRANSACTIONS ON CIRCUITS AND ...
1
vote
1answer
140 views

Are there real world examples demonstrating reasonable performance improvement by using move semantics?

(I've asked a similar question on SO but unfortunately it might not be proper, so I also put here; please kindly point out if you think it's a duplicate.) I've heard many words about the move ...
0
votes
3answers
89 views

What is the explication for the difference execution time for the same instruction?

As you know when we run instruction in our code like long a = b; we will not have the same ticks each to be executed. first exeution it take 2ticks; second exeution it take 3ticks; third exeution it ...
1
vote
1answer
108 views

Excel worksheet population and fomatting is slow

I have written a VSTO plugin in C# which populates several worksheets. During the population process cell values or formula are added one at a time according to user-definable criteria taken from a ...
1
vote
1answer
54 views

Does grouping threads by task improve performance?

This is kind of a lazy question on my part, since I gave up after trying only a few google terms. But when I read about multi-threaded performance, I read about context switching being bad for ...
1
vote
1answer
148 views

Correct usage of Bluebird promise

This is related to this question on promise performance. The current top answer states that using new Promise is an anti-pattern in bluebird And that promisify should be used instead. I ...
9
votes
1answer
418 views

Why are native ES6 promises slower and more memory-intensive than bluebird?

In this benchmark, the suite takes 4 times longer to complete with ES6 promises compared to Bluebird promises, and uses 3.6 times as much memory. How can a JavaScript library be so much faster and ...
1
vote
2answers
102 views

Reading Element Names vs Reading Element Attributes: Speed

I am working on a project where there are a whole bunch of strings being stored in an XML file for later retrieval. Stored with each string are between 0-10 tags that a user can use to access and sort ...
1
vote
1answer
96 views

How to evaluate the performance of a Data Access Layer b/w two ORM's?

I am currently working on a project where I am going to replace the Data Access Layer from a custom ORM to Entity Framework.(The product is almost complete and mostly any changes that will follow ...
2
votes
1answer
118 views

What happens when one reaches their framework's maximum requests per second?

I've been dabbling in code for many years now but it's always been personal projects. I don't have experience with much traffic. I was recently reading through a "Hello, World." tutorial for ...
13
votes
1answer
322 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 ...
2
votes
2answers
89 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; ...
0
votes
1answer
41 views

Tags DB structure - tags table using one join and GROUP BY, or pivot (join) table using two joins?

I'm implementing tags into my question and answer application. Users will be limited to the tags available by the app, so they can't choose their own. So maybe only 30-50 tags will be available. This ...
2
votes
2answers
181 views

How to store data in memory(RAM) using php without using Memcache/Redis or any other software? [closed]

I want to implement a cache system in PHP consisting of following features 1) It should be able to store any(large or small) amount of data as long as the memory serves.(key value pair i.e. get & ...
0
votes
1answer
160 views

Lucene vs Solr - Indexing pdf/word documents reisiding on a NAS drive using .Net [closed]

Using ASP.Net, I want to implement full text search using Lucene/Solr on a LARGE number of docs (word, pdf etc.) residing in a directory on a NAS drive. The NAS drive would be mapped as a network ...
14
votes
3answers
2k views

why is the latter function 10% faster although it must create the variables over and over again?

var toSizeString = (function() { var KB = 1024.0, MB = 1024 * KB, GB = 1024 * MB; return function(size) { var gbSize = size / GB, gbMod = size % GB, mbSize = gbMod ...
2
votes
2answers
80 views

Is using triggers best solution for this scenario

A large SQL transactional database has more than 100 tables (and it will grow). One of them is called Order. Then, there is another table WorkLoad which derives from Order and many other joined table ...
0
votes
0answers
78 views

Writing Z80 table based assembler/disassembler

I have a long-term project: DIY computer with various processors. One of my wishes not only make hardware, but software too. So I started from assembler/disassembler for Linux, though there is a lot ...
3
votes
1answer
117 views

Can SSE (or AVX) be used to do large bsf?

I'm faced with having to do a bsf (find the first bit set) in a 512bits bitmap. This is in the hot path so I'd like to see how I can speed things up. Right now I'm maintaining a header entry to know ...
1
vote
2answers
145 views

Line intersection detection algorithm

I'm trying to detect if a line drawn by the user intersects itself. I'm using a line intersection detection algorithm that goes through each waypoint of the line and checks if intersects with any ...
0
votes
1answer
38 views

Windows Firewall single rule with multiple IP addresses vs multiple rules with single IP address [closed]

I've tried finding some resources to help me on my dilemma, but wasn't successful in my approach. So here goes: I am implementing an automated firewall manager for Windows Firewall which will ban ...
-3
votes
2answers
174 views

Can a high level language be faster than native C? [closed]

Hand-crafted C is almost unbeatable. If an experienced C developer knows what he is doing, he will be able to write C code much faster than higher level code. But can a medium/big programme written in ...
1
vote
2answers
165 views

Should I prefer Python generators to lists?

Python iterators can be very memory efficient. Should I always prefer to use generators instead of just lists? In what situations should I prefer a plain array? For example instead of this: emails = ...
5
votes
2answers
570 views

Where is the evidence for the performance of Node.js?

A lot of developers, especially ones who haven't used Node.js in production, seem to believe that Node.js is faster than other interpreted languages such as PHP, Python, and Ruby. These claims ...
1
vote
0answers
58 views

Reading large files for ETL program POC

I'm looking for some information on how to increase the performance of reading large text files for use in an ETL process. We're currently using a proprietary program that is more of a scripting ...
3
votes
2answers
254 views

Best practice for uploading large file, previewing, and editing before saving to database?

I am allowing users to upload a relatively large .csv file (about 1MB) - it will contain thousands of records that each represent one of my business objects. I want the users to upload the file and ...
1
vote
4answers
134 views

What do polynomial algorithms entail?

From here, I know it is that an algorithm that... ...is said to be solvable in polynomial time if the number of steps required to complete the algorithm for a given input is O(n^k) for some ...
59
votes
7answers
10k views

Is a 1 < 10 comparison less expensive than 1 < 1000000?

I just used ~1 billion as the count for a z-index in CSS, and was thinking about the comparisons that must go on. Is there a difference in performance on the ALU level in comparisons between very ...
1
vote
2answers
146 views

Is it better to perform a calculation in the field's setter or have a different method?

I'm implementing a simple Quota object which determines a usage percentage based on the maximum and the used. private int maximum; private int used; public Quota(int used, int maximum) { ...
1
vote
2answers
127 views

Is it a Good Practice to Catch All Exception? [duplicate]

The snippet below (in java) gives an example of my question. try { // code implementation here } } catch (Exception ex) { } ...
1
vote
2answers
71 views

Should benchmarks (to compare processors performance) be compiled with optimization CFLAGS?

I need to compare performance of 2 processors and I concluded I should benchmark then with several various tests. I'm currently using linpack (HPL) (because it's still well known and used for ...
7
votes
2answers
613 views

How to efficiently store big time series data?

I need to store and to be able to query some very large amounts time series data. Properties of the data are as follows: number of series : around 12.000 (twelve thousand) number of data points, ...
0
votes
1answer
56 views

Quickly write log entries from http requests in a MySQL database with high performance

When a dataset is saved in the software I use, a http request is triggered (fire-and-forget). Information like the timestamp, the user and the changes made are listed in the GET parameters. Now I ...
2
votes
3answers
95 views

Architecture for an event admission ticket scanner for events with multiple entries

I am working on a service that lets event organizers sell tickets to their events online (a lot like Eventbrite to be honest). The customers then print the tickets themselves (each ticket has a ...
2
votes
3answers
169 views

Effect of denormalizing

Here's a scenario where I'm wondering whether to denormalize a relational database (MS SQL). Text description of the requirement I have users (stored in a users table). Users belong to Accounts: ...