Skip to content

Instantly share code, notes, and snippets.

View HurricanKai's full-sized avatar

Kai Jellinghaus HurricanKai

View GitHub Profile

<link, Wiki: Execute>

Branching

@HurricanKai
HurricanKai / Commands19w03c.md
Last active January 22, 2019 20:09
MC Commands 19w03c
  • xp -> experience
  • worldborder
    • warning
      • time
        • <time>
      • distance
        • <distance>
    • set
      • <distance>
        • [time]
const int length = 1000;
// create a module
var module = LLVM.ModuleCreateWithName("Example");
// signature
var funcType = LLVM.FunctionType(LLVM.ArrayType(LLVM.Int64Type(), length), new LLVMTypeRef[] { LLVM.ArrayType(LLVM.Int32Type(), length), LLVM.Int32Type() }, false);
// actual definition
var funcDef = LLVM.AddFunction(module, "Add", funcType);
// builder
// define Targets
LLVM.InitializeX86TargetMC();
LLVM.InitializeX86Target();
LLVM.InitializeX86TargetInfo();
LLVM.InitializeX86AsmParser();
LLVM.InitializeX86AsmPrinter();
const int length = 1000;
// create a module
// define Targets
LLVM.InitializeX86TargetMC();
LLVM.InitializeX86Target();
LLVM.InitializeX86TargetInfo();
LLVM.InitializeX86AsmParser();
LLVM.InitializeX86AsmPrinter();
// create a module
var module = LLVM.ModuleCreateWithName("Example");

.NET Core 2.2.0 (CoreCLR 4.6.27110.04, CoreFX 4.6.27110.04), 64bit RyuJIT

; MinecraftNetworkBenchmarks.ReadLongBenchmark.ReadLongPooledSync()
       mov     rcx,qword ptr [rcx+8]
       call    MinecraftNetworkBenchmarks.FullSyncDevNetworkUtils.ReadLong(System.IO.Stream)
       nop
; Total bytes of code 10
; MinecraftNetworkBenchmarks.FullSyncDevNetworkUtils.ReadLong(System.IO.Stream)
public class DebugRenderer : MonoBehaviour
{
private bool _enabled = true;
static Material lineMaterial;
static void CreateLineMaterial()
{
if (!lineMaterial)
{
// Unity has a built-in shader that is useful for drawing
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace WorldStructure
{
public struct Chunk
{
public const int WIDTH = 16;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Order;
using BenchmarkDotNet.Running;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
9aed4553dba72f8424da7b3b3029e3974a5bea7b