- Replaced linear searches over lists with hash sets.
- Removed many creations of new lists objects when not needed.
- Caching computations when possible:
- Creating lists objects for enumerable when they are iterated more than once.
- Caching global getters' computation as a static object if they are practiacally immutable.
- Store indexing of arrays in local objects instead of performing multiple indexing calls.
- Replace DistanceTo() calls with DistanceToSquared() to reduce Math.Sqrt() calls.
- Replaced string concatination with an equivalent procedure using StringBuilder and string interpolation.
- Reducing reflection operations when possible by using Traverse of the Harmony library.
- Reduced nested loops when possible, avoiding redundant iterations.
- Replaced some LINQ method calls with for and foreach loops.
- Replaced with ContainsKey()+indexing with a single TryGetValue().
- Replaced AddDistinct() calls on lists with hash sets.
Evyatar108/TMagic-Optimized
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published