Top "Optimization" questions

Optimization is the act of improving a method or design.

Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is …

javascript html performance optimization href
Why is processing a sorted array faster than processing an unsorted array?

Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data …

java c++ performance optimization branch-prediction
How do I position one image on top of another in HTML?

I'm a beginner at rails programming, attempting to show many images on a page. Some images are to lay on …

html css optimization graphics
Optimum way to compare strings in JavaScript?

I am trying to optimize a function which does binary search of strings in JavaScript. Binary search requires you to …

javascript string optimization comparison binary-search
What is the purpose of the "role" attribute in HTML?

I keep seeing role attributes in some people's work. I use it too, but I'm not sure about its effect. …

html optimization seo roles
How do I add indices to MySQL tables?

I've got a very large MySQL table with about 150,000 rows of data. Currently, when I try and run SELECT * FROM …

mysql optimization indexing row
What is the most effective way for float and double comparison?

What would be the most efficient way to compare two double or two float values? Simply doing this is not …

c++ algorithm optimization floating-point
Big O, how do you calculate/approximate it?

Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure …

algorithm optimization complexity-theory big-o performance
SQL: How to properly check if a record exists

While reading some SQL Tuning-related documentation, I found this: SELECT COUNT(*) : Counts the number of rows. Often is improperly used …

sql optimization query-optimization
Improve INSERT-per-second performance of SQLite

Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per …

c performance sqlite optimization