Skip to main content
4 events
when toggle format what by license comment
Oct 3, 2019 at 2:52 comment added b3m2a1 @JerryGuern You’re making Mathematica loop a bunch of times rather than letting that happen at the C level when Flatten is called. Basically I’m saying that Sakra’s answer will be the best in all likelihood. In general, you want to maintain a nested List structure when constructing your dataset because this is stored as a linked list. Next best is list of list since that will be pointers. Then when you need it cast to the proper array you’ll want to use.
Oct 2, 2019 at 19:43 comment added Jerry Guern I'm wondering though, if Bag is what Reap/Sow use internally, why would this be slower than adding lists, rather than much faster? I didn't understand that part of your Answer.
Oct 2, 2019 at 19:41 comment added Jerry Guern Oh, thank you. SE didn't notify me of this Answer for some reason, so I just saw it today. Yes, this is conceptually what I was trying to do, and I appreciate this glimpse into what MMA is doing 'under the hood'.
Jul 23, 2019 at 20:19 history answered b3m2a1 CC BY-SA 4.0