If I understand correctly Groovy is dynamically typed but since it's almost a superset of Java, static type information may optionally be provided. This could be useful if writing something where only a few parts are performance critical while avoiding the friction of using multiple languages. Type annotations could be provided only for the performance critical parts.
What is the performance penalty for using Groovy instead of Java in functions/classes where the Java-like subset is used and static type annotations are provided?
@CompileStatic
has been added to the main Groovy language. – Bettinabettine