New issue
Advanced search Search tips

Issue 726107 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

[CRD iOS] Investigate precalculation for the fling curve

Project Member Reported by yuweih@chromium.org, May 24 2017

Issue description

Currently the displacement of FlingTracker is calculated in runtime using this formula:
x = T * v0 * (1-exp(-t/T))

The exp calculation can be potentially expensive.

We may precalculate an array d[r] = 1-exp(-r) then calculate the displacement in runtime by:
x = T * v0 * d[t/T]

Precalculating d[r] will introduce more complex logic and reduce the precision of the result. More research is needed to see whether we can gain more by doing this.
 
This value is calculated once per frame. I doubt that precalculating exp() would give any measurable effect at all, so it's not worth spending any time on this optimization.

Comment 2 by yuweih@chromium.org, Jun 23 2017

Status: WontFix (was: Assigned)
Cool. Then let's not do that.

Sign in to add a comment