KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In Java, would there be any performance impact in using post increment vs pre increment operator? (In other languages, a pre-increment can be faster than a post-increment in certain contexts.) For example, is there a performance difference in these loops? for (int n = 0; idx < max; ++idx) { /* Note pre-increment */ f(max); } Vs. for (int n = 0; idx < max; idx++) { /* Note post-increment */ f(max); }
Tags (comma-separated)
Save Edits
Cancel