Profile editor - Integrated visual scripting

This commit is contained in:
Robert committed 2022-04-03 22:21:56 +02:00
1 parent 372991a69b
commit 66ea718316
96 files changed
+2413 -238

No files matched your search

@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Artemis.Core;
using BenchmarkDotNet.Attributes;
namespace Artemis.Benchmarking
{
public class NumericConversion
{
private readonly float _float;
private readonly Numeric _numeric;
public NumericConversion()
{
_float = 255235235f;
_numeric = new Numeric(_float);
}
[Benchmark]
public void FloatToIntCast()
{
var integer = (int) _float;
}
[Benchmark]
public void NumericToIntCast()
{
var integer = (int) _numeric;
}
[Benchmark]
public void NumericToIntConvertTo()
{
var integer = Convert.ChangeType(_numeric, typeof(int));
}
}
}
+3
View File
@@ -0,0 +1,3 @@
using BenchmarkDotNet.Running;
BenchmarkRunner.Run(typeof(Program).Assembly);
File diff suppressed because it is too large. Load diff