@@ -0,0 +1,1991 @@
+package org.cyclops.cyclopscore.nbt.path;%0A%0Aimport net.minecraft.nbt.NBTTagCompound;%0Aimport net.minecraft.nbt.NBTTagList;%0A%0Apublic class BenchmarkNbtPath %7B%0A%0A    public static void main(String%5B%5D args) throws NbtParseException %7B%0A        // Parsing takes ~2x as much time as execution, so pre-parsing ahead of time is definitely valuable.%0A        runParse(100000); // 0.00541ms/op%0A        runExecute(100000); // 0.0038ms/op%0A    %7D%0A%0A    private static void runParse(int replication) %7B%0A        benchmark(%22parse%22, () -%3E %7B%0A            try %7B%0A                NbtPath.parse(%22$.a.bdef.c%5B?(@.c == %5C%22B%5C%22)%5D*.x%22);%0A            %7D catch (NbtParseException e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D, replication);%0A    %7D%0A%0A    private static void runExecute(int replication) throws NbtParseException %7B%0A        NBTTagCompound tag1 = new NBTTagCompound();%0A        NBTTagCompound tag2 = new NBTTagCompound();%0A        NBTTagList tag3 = new NBTTagList();%0A        NBTTagCompound tag4 = new NBTTagCompound();%0A        NBTTagCompound tag5 = new NBTTagCompound();%0A        NBTTagCompound tag6 = new NBTTagCompound();%0A        tag1.setTag(%22a%22, tag2);%0A        tag2.setTag(%22b%22, tag3);%0A        tag3.appendTag(tag4);%0A        tag3.appendTag(tag5);%0A        tag3.appendTag(tag6);%0A        tag4.setString(%22notX%22, %22X%22);%0A        tag5.setString(%22x%22, %22X%22);%0A        tag6.setString(%22x%22, %22notX%22);%0A%0A        INbtPathExpression expression = NbtPath.parse(%22$.a.b%5B?(@.x == %5C%22X%5C%22)%5D%5B0%5D.x%22);%0A        benchmark(%22execute%22, () -%3E expression.match(tag1).getMatches().findFirst().get(), replication);%0A    %7D%0A%0A    public static void benchmark(String label, Runnable runnable, int replication) %7B%0A        long startTime = System.currentTimeMillis();%0A        for (int i = 0; i %3C replication; i++) %7B%0A            runnable.run();%0A        %7D%0A        long stopTime = System.currentTimeMillis();%0A        long elapsedTime = stopTime - startTime;%0A        System.out.println(label + %22: %22 + ((double) elapsedTime) / replication + %22ms/op%22);%0A    %7D%0A%0A%7D%0A

Add nbt path benchmarking