Questions tagged [performance]
Questions related to improving application performance, this can be range from selection software architecture to selection of algorithms.
Which hashing algorithm is best for uniqueness and speed?
Which hashing algorithm is best for uniqueness and speed? Example (good) uses include hash dictionaries. I know there are things like SHA-256 and such, but these algorithms are designed to be secure,...
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 ...
Why are native ES6 promises slower and more memory-intensive than bluebird?
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 ...
How to become a "faster" programmer?
My last job evaluation included just one weak point: timeliness. I'm already aware of some things I can do to improve this but what I'm looking for are some more. Does anyone have tips or advice on ...
Does giving a developer a slower development machine result in faster/more efficient code? [closed]
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 ...
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 ...
When to optimize for memory vs performance speed for a method?
I recently interviewed at Amazon. During a coding session, the interviewer asked why I declared a variable in a method. I explained my process and he challenged me to solve the same problem with fewer ...
When do function call costs still matter in modern compilers?
I am a religious person and make efforts not to commit sins. That is why I tend to write small (smaller than that, to reword Robert C. Martin) functions to comply with the several commandments ordered ...
Is it bad practice to write code that relies on compiler optimizations?
I've been learning some C++, and often have to return large objects from functions that are created within the function. I know there's the pass by reference, return a pointer, and return a ...
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/ http://blog.dhananjaynene.com/2008/07/performance-...
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 ...
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 call an ...
Why is NoSQL faster than SQL?
Recently I was asked: Why is NoSQL faster than SQL? I didn't agree with the premise of the question... it's just nonsense for me personally. I can't see any performance boost by using NoSQL ...
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 ...
Why do people still say Java is slow? [closed]
For a long time in SO and in other places Java has the reputation of being slow. From jokes to many comments in questions and answers, people still believe Java is slow based solely on experience with ...
Can we make general statements about the performance of interpreted code vs compiled code?
I'm comparing two technologies in order to reach a recommendation for which one should be used by a company. Technology A's code is interpreted while technology B's code is compiled to machine code. ...
What is a realistic, real-world, maximum size for a SQLite database?
According to this article on Appropriate Uses For SQLite it says that, while SQLite is limited to 140 terabytes, a client/server RDBMS may work better: An SQLite database is limited in size to 140 ...
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. ...
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 ...
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 ...
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 ...
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 ...
In software programming, would it be possible to have both CPU and GPU loads at 100%?
This is a general question on a subject I've found interesting as a gamer: CPU/GPU bottlenecks and programming. If I'm not mistaken, I've come to understand that both CPU and GPU calculate stuff, but ...
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?
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 ...
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. ...
Is there any reason to use varchar over text columns in a database?
Is varchar just a remnant from before text came around, or are there use cases where you would want to use a varchar? (Or char for that matter..) (I use Postgres and MySQL (MyISAM) daily, so those ...
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.) ...
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 users?...
Did the gradual shift in methodology of writing code affect system performance? And Should I care?
TD;DR: There was some confusion as to what I was asking, so 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 ...
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 ...
How to design a scalable notification system? [closed]
I need to write a notification system manager. Here is my requirements: I need to be able to send a Notification on different platforms, which may be totally different (for exemple, I need to be ...
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. ...
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 ...
Am I right that switching programming languages will have little impact on the scalability of a CRUD API?
An external consultant to our team advised us to rewrite our SaaS offering (essentially a CRUD API) in .NET because this is more "scalable" than using Node.js (or Ruby on Rails, Flask, etc.)....
Does Garbage Collection Scan The Entire Memory?
I was reading a bit about garbage collectors and I am wondering if the garbage collector of a program scans the entire heap memory or what is allocated to it? If it reads the entire system memory, ...
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 ...
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, ...
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 ...
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 ...
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 ...
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, ...
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 ...
KPI's for Programmers [duplicate]
Do you know any Key Performance Indicators for Developers? What should be measured and monitored?
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 (...
In the days of modern computing, in 'typical business apps' - why does performance matter? [closed]
This may seem like an odd question to some of you. I'm a hobbyist Java programmer. I have developed several games, an AI program that creates music, another program for painting, and similar stuff. ...
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 ...
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 ...