in reply to Re^2: Printing Fixed Width Strings and Spliting String into Multiple Lines
in thread Printing Fixed Width Strings and Spliting String into Multiple Lines

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.

True laziness is hard work
  • Comment on Re^3: Printing Fixed Width Strings and Spliting String into Multiple Lines