Top "Performance" questions

For questions pertaining to the measurement or improvement of code and application efficiency.

Best way to stress test a website

This may be the wrong question to ask but, what's the best way to replicate a large load on an …

performance stress-testing qa
Why is "1000000000000000 in range(1000000000000001)" so fast in Python 3?

It is my understanding that the range() function, which is actually an object type in Python 3, generates its contents on …

python performance python-3.x range python-internals
HashSet vs. List performance

It's clear that a search performance of the generic HashSet<T> class is higher than of the generic …

.net performance collections list hash
In .NET, which loop runs faster, 'for' or 'foreach'?

In C#/VB.NET/.NET, which loop runs faster, for or foreach? Ever since I read that a for loop …

c# .net performance for-loop
What's the fastest way to loop through an array in JavaScript?

I learned from books that you should write for loop like this: for(var i=0, len=arr.length; i < …

javascript performance loops
MySQL: Fastest way to count number of rows

Which way to count a number of rows should be faster in MySQL? This: SELECT COUNT(*) FROM ... WHERE ... Or, the …

mysql performance
Fastest way to get the first object from a queryset in django?

Often I find myself wanting to get the first object from a queryset in Django, or return None if there …

python django performance django-models
How to clear APC cache entries?

I need to clear all APC cache entries when I deploy a new version of the site. APC.php has …

php performance caching apc
How do I do logging in C# without using 3rd party libraries?

I would like to implement logging in my application, but would rather not use any outside frameworks like log4net. …

c# .net winforms performance logging
How do you performance test JavaScript code?

CPU Cycles, Memory Usage, Execution Time, etc.? Added: Is there a quantitative way of testing performance in JavaScript besides just …

javascript performance