another example of microoptimization

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

View File

@ -112,6 +112,7 @@ Micro-optimizations try to improve the performance of an application by replacin
* eliminate an allocation.
* replace `Vector3.Distance(a,b) < K` with `Vector3.SqrMagnitude(b - a) < K * K`
* convert a class to struct
* manually inlining small functions
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)