Skip to content

Reusing 3x3 array#84

Open
mcrrobinson wants to merge 2 commits intoopen-dis:masterfrom
mcrrobinson:master
Open

Reusing 3x3 array#84
mcrrobinson wants to merge 2 commits intoopen-dis:masterfrom
mcrrobinson:master

Conversation

@mcrrobinson
Copy link

In high frequency simulations running at many times a second, this allocation can add up. By defining _IDENTITY_3X3 once as a class attribute, you allocate that memory only once when the class loads.

the rotation.
"""

n_v_t = normal_vec.transpose()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n_v_t appears to be unused, makes sense to remove it. Good find.

Old habits die hard.

Co-authored-by: Leif Gruenwoldt <leifer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants