Return to search

Execution time optimisation of a physics engine / Exekveringstidsoptimering av en fysikmotor

This paper contains several suggestions of improvements for an existingin-house physics engine. It treats subjects such as mathematical simpli-fications, data dependencies, branching, broad phase collision detectionand data-oriented programming. The suggested improvements are testedwith two devices, a Samsung Galaxy A6 running on a ARM Cortex-A531.6 GHz Octa-Core Processor running Android OS, and an iOS device,iPhone 11 A2221 running on two 2.7 GHz cores and four 1.7 GHz coresin its A13 Bionic chip. Combining two constraints within a particle wheel reduces the execu-tion time of the physics engine by 25% and 18% for a Samsung A6 andan iPhone 11 respectively. Mathematical simplifications of certain con-straints led to a removal of an unnecessary function call to sqrt() whichreduced the time by 3% and 2%. These two suggestions have been testedby the community and do not significantly alter the realism nor the playa-bility of the game. A removal of already replaced constraints reduced the time by 2% and3%. An implementation of broad phase collision detection between playerobjects and objects in the environment reduced the execution time by 6%and 8%. The last suggestion, a reorganisation of the order in which theconstraint solver solves constraints did not reduce the time for the Sam-sung A6 but did reduce the time by 3% for the iPhone 11. Other hypotheses that did not reduce the execution time included avoid-ing branching and implementation of Unity’s job system in the constraintsolver which both increased the execution time of the physics engine. In summary the possible total execution time reduction of the physicsengine sums up to 36% for the Samsung A6 and 34% for the iPhone 11.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:umu-174008
Date January 2020
CreatorsLundberg, Jimmy
PublisherUmeå universitet, Institutionen för fysik
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0016 seconds