It is quite common that you only need to optimize very small parts of a program to this level. The rest of the program can be written in more conventional styles.
You could of course FFI into e.g. C for those parts, but that is usually harder to maintain than a few well optimized java classes.