Skip to main content
5 events
when toggle format what by license comment
Mar 8, 2012 at 17:28 history migrated from stackoverflow.com (revisions)
Mar 8, 2012 at 13:43 vote accept mboratko
Mar 8, 2012 at 5:43 comment added Szabolcs @process91 As I understand, Share[] optimizes the way expressions are stored. Every time a new expression is created, there will be a chance that Share[] can reduce memory usage. According to the documentation, Share[] might improve performance. There is no need to reconstruct anything: the information is all there except duplicate parts of expressions are not stored twice. I do not have much practical experience with the performance effects of Share[] because I don't usually work with expressions where it has such a significant effect, like in your case.
Mar 8, 2012 at 2:53 comment added mboratko Thanks for the tip. Much cleaner than my solution. I had two separate questions about the Share[] command - do you know if you have to run it more than once if you have created new complicated expressions since you originally ran it? Also, do algorithms (say the GroebnerBasis algorithm) take more time when you have used the Share[] command because they have to, in a sense, reconstruct the information?
Mar 7, 2012 at 8:22 history answered Szabolcs CC BY-SA 3.0