Software Profiling

One of the most common complaints about dynamic (nee scripting) languages is that they're slow. But that gets us off on the wrong foot. Saying a programming language isn't fast is like saying a basketball isn't orange. Is that a bad thing? Of course it's something you expect, but is it necessary? Ok, it's a bad analogy -- all other things being equal, of course faster is better ... but when are all other things ever equal?

And then, with the problem phrased as such, DynLang proponents get dragged into a battle that they usually concede -- despite being able to win it.

Order n

If you're you're really concerned about speed, you should spend more time studying time complexity. Don't use an O(n^2) algorithm when there's a perfectly good one that's O(n).

In a dynamic language, you'll have an easier time thinking at the level of the algorithm. Also, in some dynamic languages (Haskell, etc.) lazy evaluation allows you to use amortized time, which can give you some surprisingly fast data structures.

Profiling

You say you're using all the right algorithms, but

Red Herring!

But then how can you complain that Java's slow?

Easy. Java loses execution speed without gaining any of the other benefits of dynamic languages. Its development speed is a bit faster than C++'s, possibly double, but that doesn't compare to the order of magnitude difference for languages such as RubyLanguage and LispLanguage.