Skip to content

Inline Matrix3 element functions? #67

@samreid

Description

@samreid

While working on phetsims/circuit-construction-kit-common#295 @jonathanolson and I noticed that Safari iPad3 tethering reported a non-negligible amount of time being spent in the Matrix3 element functions like m00, m01, etc.

We tried a CCK-DC test with the usual m00 style functions and saw ?profiler report between 21-22 frames per second. When inlining these functions (and using array accessors instead), the performance reported 22-23 frames per second. We only ran this test once, it would be good to confirm and run on other hardware such as iPad2.

Replacing the named element accesses with indexed array accesses would make Matrix3 harder to read and understand and maintain, but may buy us a bit of performance across all our sims.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions