/me screams into the void: "The overhead of generating the number strings is completely irrelevant".
This is one of the plethora of guises of premature optimisation. Don't do that! Write your code so that it is clear and easy to maintain - in this case probably using sprintf. If benchmarking demonstrates that this piece of code is a significant bottleneck then it is time to think about generating something quicker. If there is any other I/O going on in the code then it is pretty much guaranteed that a simple sprintf solution is not going to contribute enough overhead to be an issue.
In reply to Re: looping efficiency
by GrandFather
in thread looping efficiency
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |