Skip to content

Instantly share code, notes, and snippets.

@ArchyInf
ArchyInf / PerfTest.cs
Created February 11, 2021 15:25
LambdaOverhead
using System;
using NUnit.Framework;
using Unity.PerformanceTesting;
[TestFixture]
public class PerfTest
{
[Test, Performance]
public void LambdaOverhead()
{
static TypeDB GetTypeDB(BuildTarget buildTarget)
{
BuildTargetGroup group;
if (!Enum<BuildTargetGroup>.TryParse(buildTarget.ToString(), out group))
group = BuildTargetGroup.Standalone;
var settings = new ScriptCompilationSettings
{
target = buildTarget,
group = group,