"I'm not back." - Bill Harding, Twister
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by mangpal singh:
As per Jim's suggestion, here is the time required for each case after running it 4 times consecutively. Surprisingly, case 2 takes more time except once.
Case 1 Case 2
844 1078
1469 1578
1438 1422
922 1141
Originally posted by Bj�rn Julander:
Also remember, the possibility that if you have non-fixed font you will
have a lot of extra lines in case 2 compared to case 1.
Originally posted by mangpal singh:
The number of iterations performed by both the loops is same whether u go from 0 - 49999 or 50000 - 1.
Originally posted by Ernest Friedman-Hill:
Almost exactly the same lines are printed in both cases, but in a different order.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
Case 1 prints "l"s, case 2 "m"s. With a non-fixed font, the "m"s are likely to produce more line breaks...
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Originally posted by Ankur Sharma:
This is proved old mathametical algorithm that decreasing a number is faster then Increasing a number and the another fatcor is
about zero flag. which is easier then to compare every time you increase the number and then compare it to maximum value....
No Winds No Waves
No Winds No Waves
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |