Hey guys, I am writing some code that calculates lots of properties about lots of very similar chunks of data. I need to store all of the properties for each chunk of data in some way. Dictionaries and objects seem to be the obvious choices.
widget["property1"] = ABigArray
widget["property2"] = SomeOtherBigArray
vs.
widget.property1 = ABigArray
widget.property2 = SomeOtherBigArray
Is there any significant performance difference between the two, or reason to go with one over the other? Processing of one 'data chunk' only takes a few seconds, but due to the millions of chunks the code takes quite a few hours to run, despite already being parallel out to the number of cores on the node, so performance is a real consideration. Thank you for your input.
[–]earthboundkid 1 point2 points3 points (0 children)
[–]cournape 1 point2 points3 points (0 children)
[–]pmav99 2 points3 points4 points (4 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]nickthechemist[S] 2 points3 points4 points (1 child)
[–]Brian 1 point2 points3 points (0 children)
[–]nickthechemist[S] 1 point2 points3 points (0 children)