I'm running some analysis that requires the creation, row by row, of a large list of lists. The big list is called "Nodes" and it will ultimately contain hundreds of thousands of rows. The first few rows will look like this ...
Row 1: {{1,3,5}, {2,4,6}, {7}, {6,7,8,9}}
Row 2: {{7,3,8}, {2,5,4}, {2}, {6,2,8,4}}
Row 3: {{9,7,5}, {5,4,6}, {1}, {6,7,8,9}}
I've tried AppendTo and Join in this way ...
Nodes = AppendTo[Nodes,List[{8,3,2},{1,2,3},{8},{8,3,3,2}]];
Nodes = Join[Nodes,List[{8,3,2},{1,2,3},{8},{8,3,3,2}]];
and they both take quite a long time to run.
I also tried creating a huge Nodes array ahead of time and then replacing each row, something like this ...
Nodes = Range[200000];
For[ji = 1, ji < 200001, ji++, Nodes[[ji]] = List[{}, {}, {}, {}]];
followed by
Nodes[[nodesrownumber]] = List[{8,3,2},{1,2,3},{8},{8,3,3,2}]];
and this seems to take even longer.
Any suggestions for improving the speed of this? Thanks, very much, in advance.

AppendTo. In any case, where do the elements come from? Are you generating them randomly, from prior results in list, from some other list, from... you need to specify this question much more precisely. – ciao Jul 31 '15 at 04:11AppendToIs probably your problem because it generates a copy of its argument before appending. Look into using e.g.ReapandSowinstead (http://blog.wolfram.com/2011/12/07/10-tips-for-writing-fast-mathematica-code/ and http://mathematica.stackexchange.com/questions/70149/lookup-construction-using-data-matrix-and-reap-sow-versus-appendtos). We will also need to know how you are generating your lists in order to help you. – MarcoB Jul 31 '15 at 04:15MinimalByandTakeSmallestBy, both really new functions (2014 and 2015 respectively), and both really slow at doing the very thing their name implies... – MarcoB Jul 31 '15 at 15:25