java is very performant. it often runs only a bit slower than compiled languages
some of this is due to the hotspot compiler, but some of it is because garbage collection is can actually be good for performance (it can be cheaper to run along not worried about deallocating things, and then deallocate them all at once when you have free time)