mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Profile editor - Integrated visual scripting
This commit is contained in:
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
using BenchmarkDotNet.Running;
|
||||
|
||||
BenchmarkRunner.Run(typeof(Program).Assembly);
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user