|
From: Luigi B. <lui...@gm...> - 2008-07-18 12:25:10
|
On Wed, 2008-07-16 at 13:15 +1000, Mark joshi wrote: > I was testing the pathwise vegas class today and was a bit surprised > by the slowness and memory usage. > I eventually tracked the problem down to the SequenceStatistics class; > storing all the values for 32768 paths > was having a severe effect. By eliminating SequenceStatistics, I made > the problem go away. Yes, SequenceStatistics does carry some excess baggage. > I do wonder if this is why some of the other market model stuff is > running slow. Do we have alternative classes > for gathering statistics of arrays? To alleviate the memory problem, you could try GenericSequenceStatistics<IncrementalStatistics> instead---and you might want to use a typedef on that :) Also, if you want to get some more speed, and if you don't need to call the covariance() method on the collected array statistics, you can clone GenericSequenceStatistics and get rid of the bit that updates the quadraticSum_ matrix. > And should we make it possible to choose which statistics measure to > use in the market models code? In principle, we should. But I've no idea at this time if it's worth the effort. Luigi -- All generalizations are false, including this one. -- Mark Twain |