finmath / finmath-lib

Mathematical Finance Library: Algorithms and methodologies related to mathematical finance.
Apache License 2.0
488 stars 168 forks source link

Use separate locks for cloned objects of CurveInterpolation #90

Closed nahian1005002 closed 1 year ago

nahian1005002 commented 1 year ago

What is this PR for?

CurveInterpolation class was using same lock on all cloned objects despite they had own copy of the data. Perhaps making a deep copy of the lock is missed out. Consequently, it introduces significant lock contention at times. The issue is solved by having a deep copy of the lock in the clone() method so that each cloned object have its own copy of the lock.

What type of PR is it?

Bug Fix | Improvement

Todos

N/A.

What is the related issue?

N/A

How should this be tested?

UnitTests are sufficient.

Screenshots

Questions:

Does the licenses files need update?

No

Are there breaking changes for older versions?

No

Does the change require additional documentation?

No

cfries commented 1 year ago

Thank you!