Thread: performance - read huge FASTA file line by line

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by gevni
    For Exampe: I put printf statement for each iteration. In case of 10,000 first iteration take let say less then a milli second. where as in case of 100000 strings even the first iteration will take more then 30 second to print and so on.
    Do you mean "100000 strings" or "100000 characters"?

    Perhaps you should post your actual code with the printf example such that you obtained this "less than a milli second" versus "more then 30 second" difference.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #2
    Registered User
    Join Date
    Feb 2013
    Posts
    45
    100000 strings not the characters of each string. When the number of strings [lines] grow the code get slow even for the very first iteration .

    Quote Originally Posted by laserlight View Post
    Do you mean "100000 strings" or "100000 characters"?

    Perhaps you should post your actual code with the printf example such that you obtained this "less than a milli second" versus "more then 30 second" difference.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-10-2017, 08:30 PM
  2. How to read a text file line by line?
    By Sam Conran in forum C++ Programming
    Replies: 3
    Last Post: 02-18-2016, 09:22 AM
  3. Replies: 21
    Last Post: 08-07-2011, 09:55 PM
  4. Read file line by line and interpret them
    By sombrancelha in forum C Programming
    Replies: 8
    Last Post: 03-17-2011, 09:48 AM
  5. Read text file line by line and write lines to other files
    By magische_vogel in forum C Programming
    Replies: 10
    Last Post: 01-23-2011, 10:51 AM

Tags for this Thread