I should clarify, since the thing that would potentially make these things differ in perf is framework code, not this code.
If interested you can read the framework code. In this specific case, it seems you're (the OP) *not* interested in methods, but some other things like array indexing, etc... I would say that because of everything I just mentioned the difference between those two code sequences should be basically negligible kris On Tue, May 29, 2012 at 11:54 AM, Kristopher Micinski <[email protected]> wrote: > Well, since this is framework code, looking at the bytecode generated > for these pieces of code won't really help you much, there will be > little difference, and the way the JIT works for it will basically > make any perceived difference superficial anyway. > > kris > > On Mon, May 28, 2012 at 12:11 PM, G. Blake Meike <[email protected]> > wrote: >> If you have a concern, you probably ought to look at the bytecodes. >> >> Honestly, I can't imagine what kind of concern there might be at this level >> but, if you have one, that's the way to resolve it. I mean, this isn't J2ME >> or anything... >> >> G. Blake Meike >> Marakana >> >> The second edition of Programming Android is now on-line: >> http://shop.oreilly.com/product/0636920023005.do >> >> >> On Sunday, May 27, 2012 10:45:27 PM UTC-7, Jovish P wrote: >>> >>> I just want to know any difference is there in the following methods >>> like memory allocation , performance issues >>> >>> >>> TextView txtView = (TextView)findViewById(R.id. username); >>> txtView.setText("Method 1"); >>> >>> ((TextView) >>> findViewById(R.id.priority_rel_layout)).setText(priorityList[i]); >>> >>> Regards, >>> Jovish >> >> >> On Sunday, May 27, 2012 10:45:27 PM UTC-7, Jovish P wrote: >>> >>> I just want to know any difference is there in the following methods >>> like memory allocation , performance issues >>> >>> >>> TextView txtView = (TextView)findViewById(R.id. username); >>> txtView.setText("Method 1"); >>> >>> ((TextView) >>> findViewById(R.id.priority_rel_layout)).setText(priorityList[i]); >>> >>> Regards, >>> Jovish >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

