Type name like com.example.Dog
will be compiled to com/example/Dog
in the .class file. How will most JVM optimize it? It seems longer type names (or member names) need more string compares.
Long type (class and interface) names take up room in the symbol tables. The names are used at linking time as described in detail in Chapter 5 of the Java Virtual Machine Specification. Once all this linking is done, the names have no effect on run-time performance unless you are using reflection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With