Python
timeit — built-in module for timing the execution of small bits of Python code. Start here! Many performance problems can be tackled using timeit and a willingness to experiment.
profile — built-in module for function-based deterministic profiling. Use this when your code is organized into functions and you're not sure which one is taking all the time.
line_profiler — package for line-by-line profiling. Try this if your code is not organized into functions, or if you tried profile and there was no clear culprit function.
benchmark — framework for writing benchmarks: like unittest but for performance tests rather than functionality tests.