Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
> What if the array is empty?
Same thing -- check your input. `if' for check, `while' for loop/iterations.
Mixing the two isn't a good thing, worst optimization ever.
Problem and solution
Posted Apr 7, 2008 6:17 UTC (Mon) by man_ls (subscriber, #15091)
By the way, with Java your best optimization is to write while (i != 0) instead of while (i > 0), because otherwise the JVM will perform arithmetic comparisons instead of logical. (Yes, it is pitiful.) I believe they have fixed it now, but it would be nice to know for sure.
while (i != 0)
while (i > 0)
just correct loops (Problem and solution)
Posted Apr 7, 2008 8:28 UTC (Mon) by olecom (guest, #42886)
sed 'sed && sh + olecom = love' << ''
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds