Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Implement a much faster cbrt function.#132

Open
drwells wants to merge 1 commit intomasterfrom
better-cbrt
Open

Implement a much faster cbrt function.#132
drwells wants to merge 1 commit intomasterfrom
better-cbrt

Conversation

@drwells
Copy link
Copy Markdown
Owner

@drwells drwells commented Mar 7, 2023

I profiled the new Holzapfel-Ogden code and was surprised that the exponentials are much less expensive than computing cube roots. In fact, calling std::cbrt() takes up a third of the total stress function evaluation time.

This needs to be checked some more (replacing parts of the standard library is always risky) but swapping out std::cbrt() for our own custom windowed implementation essentially eliminates the cost of calling that function. Since we spend 50% of our time in the (old) heart model code calling these functions it is definitely worth investigating.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant