Top "Performance" questions

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

StringBuilder vs String concatenation in toString() in Java

Given the 2 toString() implementations below, which one is preferred: public String toString(){ return "{a:"+ a + ", b:" + b + ", c: " + c +"}"; } or …

java performance string concatenation stringbuilder
How to calculate the running time of my program?

I wrote a program and now I want to calculate the total running time of my program from start to …

java performance
MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET

What is main difference between INSERT INTO table VALUES .. and INSERT INTO table SET? Example: INSERT INTO table (a, b, …

sql mysql performance
fastest MD5 Implementation in JavaScript

There are many MD5 JavaScript implementations out there. Does anybody know which one is the most advanced, most bugfixed and …

javascript performance md5
Best way to test if a row exists in a MySQL table

I'm trying to find out if a row exists in a table. Using MySQL, is it better to do a …

sql mysql performance exists
Java: int[] array vs int array[]

Is there a difference between int[] array = new int[10]; and int array[] = new int[10]; ? Both do work, and the result …

java arrays performance definition
Comparing two byte arrays in .NET

How can I do this fast? Sure I can do this: static bool ByteArrayCompare(byte[] a1, byte[] a2) { if (a1.…

c# .net arrays performance j#
Any way to write a Windows .bat file to kill processes?

Every time I turn on my company-owned development machine, I have to kill 10+ processes using the Task Manager or any …

performance batch-file process
Equals(=) vs. LIKE

When using SQL, are there any benefits of using = in a WHERE clause instead of LIKE? Without any special operators, …

sql performance equals sql-like
Declaring multiple variables in JavaScript

In JavaScript, it is possible to declare multiple variables like this: var variable1 = "Hello, World!"; var variable2 = "Testing..."; var variable3 = 42; ...…

javascript variables coding-style performance declaration