Closed ismail0234 closed 4 years ago
You do 1 time instead of 2 times. Even fools understand that
That's naive to think. It might look to be more performant to you, but actually, after compilation both versions are equal regarding its execution time.
You can read more about this here: https://softwareengineering.stackexchange.com/questions/358685/using-local-variables-vs-making-multiple-function-method-calls
Read the text well.
There is a performance difference. Integer.toHexString(memory.read(_)) is called 2 times in the first example, and 4 times in the second example.
Apply your own knowledge anyway, goodbye.
I run a test, comparing both versions, and they have the same performance. I gave you a chance to explain why you think that this will improve performance, and you obviously have no arguments.
How should this improve the performance?