Java - Performance Questions; variable names and file name length
file, java, performance, variables
Solution
If i use variables with short names will be better/faster to process?
No. Variable names might not even be in your resulting bytecode. In the end of the day variables are mapped to registers/stack operands. Variable name is irrelevant. It's only for human beings. And they tend to prefer `superPhrase` over `s`.
if the file name is short will be faster to access it
No. Files, just like variables, are referenced using special identifiers (e.g. inodes). File name is only needed when opening/locating a file. And it's several orders of magnitude faster compared to actual file access. This applies equally to Java applications and other OS processes.
Problem
Well just some questions about performance, but i think some of the questions are logical: - If i use variables with short names will be better/faster to process? Example: "String s", will be better than "String superphrase". - About the file names, if the file name is short will be faster to access it? Example: (almost the same) filename.txt or f.txt. Thanks to all guys, i really like to make my software as better as i can :)