Does using the this
keyword affect Java performance at all?
In this example:
class Prog {
private int foo;
Prog(int foo) {
this.foo = foo;
}
}
Is there performance overhead doing that over the following?:
class Prog {
private int foo;
Prog(int bar) {
foo = bar;
}
}
A couple of coworkers and I were discussing this earlier today and no one could come up with an answer the we all agreed on. Any definitive answer?