|
|
|
|
|
by Neywiny
550 days ago
|
|
I had something like this. I was making a script that would parse a standardized file describing a molecule and create the atoms and bonds and whatnots. I found out that they time an object is added it iterates through all the objects to update them of the addition. This was very noticable even around 1k objects. I later grouped all the duplicated objects (such as all the oxygens) into 1 discontinuous object, leading to O(1 [the bonds] + #elements) instead of O(#bonds * #atoms). In the end I still lost out to another package that did the same function a lot faster. May be interesting to look back to see how they did it. |
|