I like to use Firebug profiler to improve overall speed. It will show you how many times each function is called, how much time it took to execute (average and total) and the percentage of the total JS runtime that the function performed. I am not a big fan of micro-optimization, so I do not use any tools to get the "maximum maximum" from my code, but the profiler helps get rid of big problems.
Regarding size, I use the YUI compressor to minimize the size of my JavaScript files. (There are other tools to minimize JavaScript, I'm just most used to YUI.)
source
share