local C=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local J=require(C.Matter)local E=require(C.Matter_0_8)local l=J.World.new()local f=E.World.new()local T,w,Z,D,Q,j,r=J.component(),J.component(),J.component(),J.component(),J.component(),J.component(),J.component()local X,s,A,R,p,W,L=E.component(),E.component(),E.component(),E.component(),E.component(),E.component(),E.component()local function h()return math.random()>.5 end local m={}for C=1,30000,1 do local J=C l:spawnAt(J)f:spawnAt(J)local E=""if h()then l:insert(J,T({a=true,id=C}))f:insert(J,X({a=true;id=C}))E..="\065\095"end if h()then l:insert(J,w({b=true,id=C}))f:insert(J,s({b=true;id=C}))E..="\066\095"end if h()then l:insert(J,Z({c=true;id=C}))f:insert(J,A({c=true;id=C}))E..="\067\095"end if h()then l:insert(J,D({d=true;id=C}))f:insert(J,R({d=true,id=C}))E..="\068\095"end if h()then l:insert(J,Q({e=true,id=C}))f:insert(J,p({e=true,id=C}))E..="\069\095"end if h()then l:insert(J,j({f=true;id=C}))f:insert(J,W({f=true;id=C}))E..="\070\095"end if h()then l:insert(J,r({g=true,id=C}))f:insert(J,L({g=true;id=C}))E..="\071"end m[E]=(m[E]or 0)+1 end local g=0 for C in m do g+=1 end print(g,"\100\105\102\102\101\114\101\110\116 \097\114\099\104\101\116\121\112\101\115")return{ParameterGenerator=function()return end,Functions={["\077\097\116\116\101\114 \048\046\056\046\052"]=function()local C=0 for J in f:query(s,X)do C+=1 end end;["\077\097\116\116\101\114 \048\046\057"]=function()local C=0 for J in l:query(w,T)do C+=1 end end}}
--!optimize 2
--!native
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Matter = require(ReplicatedStorage.Matter)
local PinnedMatter = require(ReplicatedStorage.Matter_0_8)

local world = Matter.World.new()
local pinnedWorld = PinnedMatter.World.new()

local A, B, C, D, E, F, G =
	Matter.component(),
	Matter.component(),
	Matter.component(),
	Matter.component(),
	Matter.component(),
	Matter.component(),
	Matter.component()
local pinnedA, pinnedB, pinnedC, pinnedD, pinnedE, pinnedF, pinnedG =
	PinnedMatter.component(),
	PinnedMatter.component(),
	PinnedMatter.component(),
	PinnedMatter.component(),
	PinnedMatter.component(),
	PinnedMatter.component(),
	PinnedMatter.component()

local function flip()
	return math.random() > 0.5
end

local archetypes = {}
for i = 1, 30_000 do
	local id = i
	world:spawnAt(id)
	pinnedWorld:spawnAt(id)

	local str = ""
	if flip() then
		world:insert(id, A({ a = true, id = i }))
		pinnedWorld:insert(id, pinnedA({ a = true, id = i }))
		str ..= "A_"
	end
	if flip() then
		world:insert(id, B({ b = true, id = i }))
		pinnedWorld:insert(id, pinnedB({ b = true, id = i }))
		str ..= "B_"
	end
	if flip() then
		world:insert(id, C({ c = true, id = i }))
		pinnedWorld:insert(id, pinnedC({ c = true, id = i }))
		str ..= "C_"
	end
	if flip() then
		world:insert(id, D({ d = true, id = i }))
		pinnedWorld:insert(id, pinnedD({ d = true, id = i }))
		str ..= "D_"
	end
	if flip() then
		world:insert(id, E({ e = true, id = i }))
		pinnedWorld:insert(id, pinnedE({ e = true, id = i }))
		str ..= "E_"
	end
	if flip() then
		world:insert(id, F({ f = true, id = i }))
		pinnedWorld:insert(id, pinnedF({ f = true, id = i }))
		str ..= "F_"
	end
	if flip() then
		world:insert(id, G({ g = true, id = i }))
		pinnedWorld:insert(id, pinnedG({ g = true, id = i }))
		str ..= "G"
	end

	archetypes[str] = (archetypes[str] or 0) + 1
end

local total = 0
for _ in archetypes do
	total += 1
end

print(total, "different archetypes")

return {
	ParameterGenerator = function()
		return
	end,

	Functions = {
		["Matter 0.8.4"] = function()
			local count = 0
			for _ in pinnedWorld:query(pinnedB, pinnedA) do
				count += 1
			end
		end,
		["Matter 0.9"] = function()
			local count = 0
			for _ in world:query(B, A) do
				count += 1
			end
		end,
	},
}
