[SUGGESTION] Cache vertex-count of poly body for performance.
See original GitHub issueIn common ,
var len = arr.length;
for (var i=0;i<len;i++){ ...}
is faster than
for (var i=0;i<arr.length;i++){ ...}
Of course , In most cases , it’s not the performance hotspot .
But in Physics Engine , it will be called so many times.
And I see there are many for (var i = 0; i < vertices.length; i++) {
will be called in one tick.
So I suggest that add a property vertexCount
to body for caching the vertex-count.
(like box2d)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Poly count for character? - Unity Forum
This is a tech test for you to find your optimal result in performance and not for having the best visual result (yet)....
Read more >MultiRes Modifier | 3ds Max 2021
The MultiRes modifier reduces the memory overhead needed to render models by decreasing the number of vertices and polygons.
Read more >Volume 2d: Command Reference: Structures - 01.org
from course of performance, course of dealing, or usage in trade. ... Slot Group Select Render Cache Message Descriptor Control Field .
Read more >Vertex Animation Textures ROP 2.0 Released | Forums - SideFX
I've been investigating different cache ways to bring in animation into unreal so I've had an eye on animation textures for a while....
Read more >A Java Stream Computational Model for Big Data Processing
CacheStream for accessing Oracle Coherence; and Java. 8 Stream Collector implementations, ... body consisting of a single expression or a statement block.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bchevalier agreed, stuff like caching the array length is pointless with modern VMs and has been for years (unless you’re manipulating the array size within the loop of course!)
Agreed with the above and in general micro-optimisations tend to be bad practice in most cases, unless the effect can be proven to be consistently large. I much prefer algorithmic improvements! Thanks for the suggestion though.