Show More
Commit Description:
Optimize PreserveCounts and only recalculate when needed....
Commit Description:
Optimize PreserveCounts and only recalculate when needed.
Previously would recalculate preservecounts every Update call (~1 per frame), which isn't necessary
when there's no tick. Might be some room to tweak, like doing these updates only when preserves change.
Some measurements: This takes about 30ms versus the .25 ms with no preserve (then like .0002ms).
When the map is filled up with preserve, about 35ms and 9ms. With a handful of
cells, it's more like 0.8ms (before JIT optimizes most of it away).
References:
File last commit:
Show/Diff file:
Action:
FNA/Microsoft.Xna.sln
37 lines | 1.8 KiB | text/plain | TextLexer
37 lines | 1.8 KiB | text/plain | TextLexer
r149 | | |||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||||
# Visual Studio Version 16 | ||||
VisualStudioVersion = 16.0.808.6 | ||||
MinimumVisualStudioVersion = 10.0.40219.1 | ||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Xna", "Microsoft.Xna.csproj", "{35253CE1-C864-4CD3-8249-4D1319748E8F}" | ||||
EndProject | ||||
Global | ||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||
Debug|x86 = Debug|x86 | ||||
Release|x86 = Release|x86 | ||||
Debug|x64 = Debug|x64 | ||||
Release|x64 = Release|x64 | ||||
Debug|Any CPU = Debug|Any CPU | ||||
Release|Any CPU = Release|Any CPU | ||||
EndGlobalSection | ||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.ActiveCfg = Debug|x86 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.Build.0 = Debug|x86 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.ActiveCfg = Release|x86 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.Build.0 = Release|x86 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x64.ActiveCfg = Debug|x64 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x64.Build.0 = Debug|x64 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x64.ActiveCfg = Release|x64 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x64.Build.0 = Release|x64 | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|Any CPU.Build.0 = Release|Any CPU | ||||
EndGlobalSection | ||||
GlobalSection(SolutionProperties) = preSolution | ||||
HideSolutionNode = FALSE | ||||
EndGlobalSection | ||||
GlobalSection(ExtensibilityGlobals) = postSolution | ||||
SolutionGuid = {2C0248DB-631B-4520-9E95-DF09CC51CD7F} | ||||
EndGlobalSection | ||||
EndGlobal | ||||