lballabio / QuantLib

The QuantLib C++ library
http://quantlib.org
Other
5k stars 1.73k forks source link

Precompute annuities #1965

Closed eleanorTurintech closed 1 month ago

eleanorTurintech commented 2 months ago

Pre-computation of Annuities: The updated code introduces a pre-computation of annuities for all rates and stores them in a vector. This avoids repeated calls to cs.coterminalSwapAnnuity() within the nested loops, potentially reducing computational overhead and improving performance.

Corresponding unit test runs ~30% faster on a single processor (standard build, g++ 11.4.0)

boring-cyborg[bot] commented 2 months ago

Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

coveralls commented 1 month ago

Coverage Status

coverage: 72.497% (+0.001%) from 72.496% when pulling 3dabf86a30953dd7d5e6d5f7c344da1dd9790b20 on turintech:feature/smmdrift-calculator-performance into 41b7ddc1bdf18c24a8e605578c11042e8e6c4f91 on lballabio:master.

boring-cyborg[bot] commented 1 month ago

Congratulations on your first merged pull request!