As a guy who does (mainframe) Performance for a living I'd say that if a language is scripting some underlying capabilities you have to think about two things:
- The capabilities' being scripted speeds. For example Java's JNI usually is doing native stuff that might not be possible to speed up.
But then there's the algorithm. If you wrote bad code (and what is bad code might be environment-specific) you get what you deserve. :-)