Update CONTRIBUTING.md

This commit is contained in:
Paul Pacheco 2020-10-13 12:23:12 -05:00 committed by GitHub
parent 02f7f9c087
commit e976ab1567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ Micro-optimizations try to improve the performance of an application by replacin
Macro-optimizations try to improve the performance of an application by changing the algorithm. Some examples include: Macro-optimizations try to improve the performance of an application by changing the algorithm. Some examples include:
* Serialize a message once O(1), instead of for every single client O(n) * Serialize a message once O(1), instead of for every single client O(n)
* Change interest management algorithm, as of this writing every object checks every other object O(n^2), it could be replaced by a sweep and prune algorithm O(n log n) * Change interest management algorithm, as of this writing every object checks every other object O(n^2), it could be replaced by spatial hashing, which is O(n)
* When synchronizing movement, instead of synchronizing every position change, you could synchronize the velocity and let the other side predict the position. * When synchronizing movement, instead of synchronizing every position change, you could synchronize the velocity and let the other side predict the position.
Macro-optimizations tend to change the **scalability** of mirror, by changing an algorithm, you may now support 10x more customers on the same hardware, it is even possible for a macro optimization to make performance worse for small numbers. Macro optimization usually make a really big difference, but are much harder to make. Macro-optimizations tend to change the **scalability** of mirror, by changing an algorithm, you may now support 10x more customers on the same hardware, it is even possible for a macro optimization to make performance worse for small numbers. Macro optimization usually make a really big difference, but are much harder to make.