💬

Community answer

Collected from the ACE community Discord archive around 2022-07-14. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Optimizing a think hook over many props

⚡ PerformanceUpdated 2 days ago•0 views
Cache math functions as locals (local sin = math.sin skips a table lookup), store physics objects instead of entities, hoist invariant values (positions) out of…

How to optimize a per-tick think hook handling dozens of physics props

Cache math functions as locals (local sin = math.sin skips a table lookup), store physics objects instead of entities, hoist invariant values (positions) out of the loop, and update at lower intervals (e.g. every N ms) instead of every tick.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.