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

Don't use my solution if you just have to print the data. I measured the time and it is slower than doing it with substr.
  • Comment on Re^2: Printing Fixed Width Strings and Spliting String into Multiple Lines

Replies are listed 'Best First'.
Re^3: Printing Fixed Width Strings and Spliting String into Multiple Lines
by mmartin (Monk) on Feb 08, 2012 at 15:50 UTC
    Ok cool, no problem... Thanks for the follow-up.


    Thanks,
    Matt

Re^3: Printing Fixed Width Strings and Spliting String into Multiple Lines
by GrandFather (Saint) on Feb 09, 2012 at 02:02 UTC

    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