iangiblin / performance-tags

experimenting with Unity Tag speed in Unity 2021

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

performance-tags

Experimenting with Unity Tag speed in Unity 2021.2.1f1

BetterTag is a component which can be attached to each object you want to tag.

  • Tags are in an enum at the top of BetterTag.cs
  • Core data structure is Dictionary(BetterTag, HashSet(GameObject))

My speed tests are built into the project.

  • Changing the tag on every object every frame enough times to be measurably slow
  • Tests conducted on a pretty stable Xeon X5660 6-core system running Win 10 Pro with 30 GB RAM.

This project builds to a standalone 640x480 windowed application.

Initial tests indicate that Unity Tag is very fast and my version takes about 1.7x as long. So, not actually "Better". LOL.

image

image

About

experimenting with Unity Tag speed in Unity 2021

License:MIT License


Languages

Language:ShaderLab 75.2%Language:HLSL 13.1%Language:C# 11.7%