Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/eval-date-problem-solved-tp1121p1128.html
On Tue, 2007-07-10 at 09:31 +0100, Toyin Akin wrote:
> Okay, so you are saying that Dispose() really plays with smart_pointers
> rather than the actual data,
>
> But it doesn't explain the fact that Dispose() needs to be called and only
> in certain cases.
True.
> I cannot believe not deleting a few memory pointers (in this particular
> example) will cause the slow down in computation here. Within the loop, if
> .NET delays the deletion of the pointers until after the loop, then in
> theory you would have 4*30 (roughly within this example) pointers (memory
> addresses) left to be deleted at the end of the loop. But these pointers
> only occupy addresses and not actual data (as you stated). This is not a lot
> of memory.
>
> And this surely cannot be the reason why the computation speed is affected.
No, it cannot. The only thing that I can think of is that when the
evaluation date is reset, notifications are sent to all alive helpers
which recalculate their relevant dates and in turn notify the
corresponding yield curves. I'm not sure how much time it takes to do
that.
Luigi
--
Hanlon's Razor:
Never attribute to malice that which is adequately explained
by stupidity.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users