Top "Optimization" questions

Optimization is the act of improving a method or design.

Logger slf4j advantages of formatting with {} instead of string concatenation

Is there any advantage of using {} instead of string concatenation? An example from slf4j logger.debug("Temperature set to {}. …

optimization logging concatenation string-formatting slf4j
Why GDB jumps unpredictably between lines and prints variables as "<value optimized out>"?

Can anyone explain this behavior of gdb? 900 memset(&new_ckpt_info,'\0',sizeof(CKPT_INFO)); (gdb) **903 prev_offset = …

c optimization compiler-construction gdb compilation
Measuring Query Performance : "Execution Plan Query Cost" vs "Time Taken"

I'm trying to determine the relative performance of two different queries and have two ways of measuring this available to …

sql sql-server sql-server-2005 optimization sql-execution-plan
How to read file content into istringstream?

In order to improve performance reading from a file, I'm trying to read the entire content of a big (several …

c++ optimization memory stream stringstream
How to log a method's execution time exactly in milliseconds?

Is there a way to determine how much time a method needs to execute (in milliseconds)?

ios objective-c optimization time
How to find rows in one table that have no corresponding row in another table

I have a 1:1 relationship between two tables. I want to find all the rows in table A that don't have …

sql optimization h2
Why is Magento so slow?

Is Magento usually so terribly slow? This is my first experience with it and the admin panel simply takes ages …

php magento optimization
Measuring actual MySQL query time

How can I measure the execution time of a query without measuring the time it spends waiting for a lock …

mysql optimization
ResultSet: Retrieving column values by index versus retrieving by label

When using JDBC, I often come across constructs like ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // …

java optimization jdbc resultset maintenance
See and clear Postgres caches/buffers?

Sometimes I run a Postgres query it takes 30 seconds. Then, I immediately run the same query and it takes 2 seconds. …

optimization postgresql