Skip to main content

Timeline for Reading in Huge Text Files

Current License: CC BY-SA 3.0

13 events
when toggle format what by license comment
Dec 4, 2012 at 22:18 comment added Leonid Shifrin But that's really not an answer, I don't answer anything specifically. Here is my advice: narrow down the question, provide a sample file format, provide a download link to a sample file, and then perhaps someone will come up with a more specific answer. But first, try all those suggestions. If they work and you get an answer which is any general (so that it could be useful for future visitors), post your own answer and accept it, if no better one appears.
Dec 4, 2012 at 22:17 answer added Andreas Lauschke timeline score: 3
Dec 4, 2012 at 22:12 comment added preeti @LeonidShifrin if you can make your comment an answer, I can see if it works and if it did, I can choose it as the best answer.Thanks.
Dec 4, 2012 at 21:14 history edited rcollyer CC BY-SA 3.0
formatting, grammer
Dec 4, 2012 at 21:12 comment added Leonid Shifrin Well, I think that answer you refer to should be pretty clear, I gave a working example there. As for this comment: I meant to say that BinaryReadList can give you more speed than Import - you can see one of the links in comments above for an example. Also,I linked to another answer of mine, where I used Java to get the file read into Mathematica 50x faster than with BinaryReadList. That answer was tailored to the specific question, but it shows how to do that.
Dec 4, 2012 at 21:00 comment added preeti your comment (that's what I meant,especially using BinaryReadList[] ) and also for the answer, how to do it when I call mathematica using -noprompt -script "test.m"? Thanks
Dec 4, 2012 at 20:58 comment added Leonid Shifrin Do you mean my comment or the answer I linked to?
Dec 4, 2012 at 20:39 comment added preeti The three links above especially the third one are related but not exactly what I need. I don't have a problem with memory. It is only the speed that I am concerned. Also, I was looking for something like if I could tell mathematica that those are going to be numbers, is it possible that it will save time? For eg: in R, it does help a lot.@LeonidShifrin can you please explain your answer? Sorry, I am not able to understand.
Dec 4, 2012 at 20:06 comment added Leonid Shifrin Import is often about the slowest you can have, particularly for tabular data. BinaryRead(List) can be much faster, and Java can give you still much faster reads, when one uses buffer reads
Dec 4, 2012 at 19:58 comment added Eli Lansey Related: stackoverflow.com/questions/2370570/…
Dec 4, 2012 at 19:58 comment added Eli Lansey Related: mathematica.stackexchange.com/questions/36/…
Dec 4, 2012 at 19:53 comment added cormullion Related: mathematica.stackexchange.com/questions/5179/…
Dec 4, 2012 at 19:50 history asked preeti CC BY-SA 3.0