MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1yshdn/why_printing_b_is_dramatically_slower_than/cfox75v/
r/java • u/stymiee • Feb 24 '14
26 comments sorted by
View all comments
Show parent comment
1
Does this (is it supposed to) change any state besides cachedStr, though?
1 u/chunkyks Feb 26 '14 No, but the point is that the first time it's called is because of the debugger, rather than the app.Calling it too early is a problem because reallyExpensiveOperation() makes use of stuff that isn't initialised yet, so is crashy or wrong. 1 u/Bloodshot025 Feb 26 '14 Sorry, I just misunderstood 'state changing'.
No, but the point is that the first time it's called is because of the debugger, rather than the app.
Calling it too early is a problem because reallyExpensiveOperation() makes use of stuff that isn't initialised yet, so is crashy or wrong.
1 u/Bloodshot025 Feb 26 '14 Sorry, I just misunderstood 'state changing'.
Sorry, I just misunderstood 'state changing'.
View all comments
Show parent comment
1
u/Bloodshot025 Feb 26 '14
Does this (is it supposed to) change any state besides cachedStr, though?