Skip to content

Instantly share code, notes, and snippets.


Vedran Grudenic vgrudenic

View GitHub Profile
View SO45126968.cs
# error Add a NUGET reference to BenchMarkDotNet
void Main()
new LookupTest().Validate();
public class LookupTest
vgrudenic / StructsVsClassesTestUnity.cs
Created May 15, 2017
Comparing struct/class access with shuffled arrays
View StructsVsClassesTestUnity.cs
using System;
using UnityEngine;
class TestScript : MonoBehaviour
struct ProjectileStruct
public Vector3 Position;
public Vector3 Velocity;
vgrudenic / StructsVsClassesTest.cs
Created May 13, 2017
Comparison of struct and class arrays in C#
View StructsVsClassesTest.cs
using System;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Structs_vs_classes_array_test
// code slightly modified from the Jackson Dunstan's article
// How to Write Faster Code Than 90% of Programmers