Difference between revisions of "Talk:Do while"
Jump to navigation
Jump to search
m (New section: Is the bottom loop faster?) |
|||
Line 4: | Line 4: | ||
Is the bottom loop faster than the one on the top (if they were to both count to 5).[[User:Bobbyb30 Zohari|Bobbyb30 Zohari]] 14:54, 28 February 2008 (PST) | Is the bottom loop faster than the one on the top (if they were to both count to 5).[[User:Bobbyb30 Zohari|Bobbyb30 Zohari]] 14:54, 28 February 2008 (PST) | ||
:They both execute the same number of iterations and the same amount of bytecode, the only difference is the ordering of the operations. There is no reason to assume one or the other loop is faster. -- [[User:Strife Onizuka|Strife Onizuka]] 17:41, 28 February 2008 (PST) |
Revision as of 17:41, 28 February 2008
This is a bit of a hack. Because of the syntax of do-while, it can't use the normal template; and I'm not keen on modifying the template for just one page. So I went up to the root template. Strife Onizuka 13:57, 8 February 2007 (PST)
Is the bottom loop faster?
Is the bottom loop faster than the one on the top (if they were to both count to 5).Bobbyb30 Zohari 14:54, 28 February 2008 (PST)
- They both execute the same number of iterations and the same amount of bytecode, the only difference is the ordering of the operations. There is no reason to assume one or the other loop is faster. -- Strife Onizuka 17:41, 28 February 2008 (PST)