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/lib/SDL2-CS/SDL2-CS.sln
32 lines | 1.6 KiB | text/plain | TextLexer
32 lines | 1.6 KiB | text/plain | TextLexer
r0 | | |||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||||
# Visual Studio 2010 | ||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL2-CS", "SDL2-CS.csproj", "{85480198-8711-4355-830E-72FD794AD3F6}" | ||||
EndProject | ||||
Global | ||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||
Debug|x86 = Debug|x86 | ||||
Release|x86 = Release|x86 | ||||
Debug|Any CPU = Debug|Any CPU | ||||
Release|Any CPU = Release|Any CPU | ||||
Debug|x64 = Debug|x64 | ||||
Release|x64 = Release|x64 | ||||
EndGlobalSection | ||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x64.ActiveCfg = Debug|x64 | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x64.Build.0 = Debug|x64 | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x86.ActiveCfg = Debug|x86 | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x86.Build.0 = Debug|x86 | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Release|Any CPU.Build.0 = Release|Any CPU | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x64.ActiveCfg = Release|x64 | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x64.Build.0 = Release|x64 | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x86.ActiveCfg = Release|x86 | ||||
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x86.Build.0 = Release|x86 | ||||
EndGlobalSection | ||||
GlobalSection(MonoDevelopProperties) = preSolution | ||||
StartupItem = SDL2-CS.csproj | ||||
EndGlobalSection | ||||
EndGlobal | ||||