In the context of anything to do with file I/O the differences you may have measured are likely to be completely irrelevant. Even for lakh (105) lines is the difference likely to be more than a second?
Benchmarking stuff is often fun, but seldom relevant and very seldom a good reason to prefer one technique over another. It is generally better to make the code clear and maintainable even if there is a small execution speed penalty.
In reply to Re^3: Printing Fixed Width Strings and Spliting String into Multiple Lines
by GrandFather
in thread Printing Fixed Width Strings and Spliting String into Multiple Lines
by mmartin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |