Hey @lol_GG1HACKE, thank you so much for taking the time to look into the code. I genuinely appreciate the honest and constructive feedback!
1. The Benchmark Fairness (0,0,0 stacking) You were absolutely right. The standard parts defaulting to 0,0,0 was a genuine oversight on my end. Stacking 10,000 anchored parts in the exact same spot created artificial rendering and physics lag for the standard loop, which unfairly bloated the difference. Thank you for calling this out!
I just completely rewrote the benchmark script to be 100% fair: both methods now spawn parts in the exact same randomized spread, and I gave the standard loop cached X/Z variables so it runs as fast as traditionally possible. I re-ran the tests: Standard now sits at around 24 FPS, while the O(1) Engine holds around 45 FPS. Even on a completely leveled playing field, the Buffer + BulkMove architecture nearly doubles the performance (an almost +90% boost)! I’ve updated the main post with the new fair script and video.
2. vector.new (Native Luau Vectors) This is a brilliant suggestion. Luau’s native vector types (vector.create) are insanely fast. I am currently back in Studio implementing this for internal math to squeeze out even more performance. You can expect a V2.1 update for this tomorrow!
3. 32-Bit Floats Memory Regarding the memory optimization, I’m curious to hear your thoughts on this! I chose 32-bit floats (buffer.writef32) to maintain world-space precision and avoid the jittering/snapping issues that usually happen with lower precision. If you have a specific implementation in mind that reduces memory without sacrificing decimal accuracy for Positions (X, Y, Z), I’d love to see how you’d handle that in the code. What kind of data type or compression logic would you suggest for this specific use case?
Thanks again for helping me keep the benchmark honest and for the great optimization ideas. This is exactly what helps the engine grow and get better for everyone! 
here is the new testing script ( a localscript in StarterPlayerScript):
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local O1 = require(ReplicatedStorage:WaitForChild("O1"))
local COUNT = 10000
local RENDER_DISTANCE = 150
local TEST_DURATION = 8 -- seconds per test
--======================================================
-- 1. AUTOMATIC GUI SETUP
--======================================================
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
local screen = Instance.new("ScreenGui", playerGui)
screen.Name = "O1_VideoBenchmark"
screen.IgnoreGuiInset = true
local statusLabel = Instance.new("TextLabel", screen)
statusLabel.Size = UDim2.new(1, 0, 0.1, 0)
statusLabel.Position = UDim2.new(0, 0, 0.05, 0)
statusLabel.BackgroundTransparency = 1
statusLabel.TextStrokeTransparency = 0
statusLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
statusLabel.TextScaled = true
statusLabel.Font = Enum.Font.FredokaOne
statusLabel.Text = "⚙️ LOADING " .. COUNT .. " PARTS..."
local fpsLabel = Instance.new("TextLabel", screen)
fpsLabel.Size = UDim2.new(1, 0, 0.15, 0)
fpsLabel.Position = UDim2.new(0, 0, 0.15, 0)
fpsLabel.BackgroundTransparency = 1
fpsLabel.TextStrokeTransparency = 0
fpsLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
fpsLabel.TextScaled = true
fpsLabel.Font = Enum.Font.GothamBlack
fpsLabel.Text = "FPS: --"
--======================================================
-- 2. ENVIRONMENT SETUP (100% FAIR CONDITIONS)
--======================================================
local standardFolder = Instance.new("Folder", workspace)
local standardParts = table.create(COUNT)
local v2Folder = Instance.new("Folder", workspace)
local v2Parts = table.create(COUNT)
local v2CFrames = table.create(COUNT)
local positionBuffer = O1.Memory.NewPositionBuffer(COUNT)
-- We use a neutral color for both to ensure rendering cost is identical
local SHARED_COLOR = Color3.fromRGB(200, 200, 200)
for i = 1, COUNT do
-- 📍 FAIR SPREAD: Both setups use the exact same generated coordinates
local initX = math.random(-200, 200)
local initZ = math.random(-200, 200)
local startPos = Vector3.new(initX, 0, initZ)
-- Standard Setup
local p1 = Instance.new("Part")
p1.Size = Vector3.new(1, 1, 1)
p1.Anchored = true
p1.Position = startPos -- Placed correctly from the start
p1.Color = SHARED_COLOR
p1.Parent = standardFolder
-- Caching BaseX and BaseZ to give the standard loop the best possible chance
standardParts[i] = {Part = p1, Phase = math.random() * 10, BaseX = initX, BaseZ = initZ}
-- V2 Setup
local p2 = Instance.new("Part")
p2.Size = Vector3.new(1, 1, 1)
p2.Anchored = true
p2.Color = SHARED_COLOR
p2.Parent = v2Folder
v2Parts[i] = p2
v2CFrames[i] = CFrame.new(startPos)
-- Writing to V2 Buffer
positionBuffer:WritePosition(i, initX, 0, initZ)
end
v2Folder.Parent = nil
task.wait(2)
-- Helper function to track real-time FPS
local function TrackFPS(duration, renderLogic)
local frames = 0
local lastFpsUpdate = os.clock()
local startTime = os.clock()
local totalFrames = 0
local connection = RunService.RenderStepped:Connect(function(dt)
local t = os.clock()
renderLogic(t)
frames = frames + 1
totalFrames = totalFrames + 1
-- Update GUI every 0.5 seconds for readability
if t - lastFpsUpdate >= 0.5 then
local currentFps = math.floor(frames / (t - lastFpsUpdate))
fpsLabel.Text = currentFps .. " FPS"
frames = 0
lastFpsUpdate = t
end
end)
task.wait(duration)
connection:Disconnect()
return math.floor(totalFrames / duration)
end
--======================================================
-- 3. RUN TESTS
--======================================================
-- TEST 1: STANDARD
statusLabel.Text = "🔴 STANDARD LOOP (Unoptimized)"
statusLabel.TextColor3 = Color3.fromRGB(255, 100, 100)
fpsLabel.TextColor3 = Color3.fromRGB(255, 50, 50)
local avgStandard = TrackFPS(TEST_DURATION, function(t)
for i = 1, COUNT do
local data = standardParts[i]
local y = math.sin(t + data.Phase) * 5
-- Fair update: using cached X and Z so it doesn't read the property (which is slow)
data.Part.Position = Vector3.new(data.BaseX, y, data.BaseZ)
end
end)
-- TRANSITION
standardFolder.Parent = nil
statusLabel.Text = "🔄 SWITCHING TO O(1) ENGINE..."
statusLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
fpsLabel.Text = "-- FPS"
fpsLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
task.wait(3)
-- TEST 2: O(1) ENGINE
v2Folder.Parent = workspace
statusLabel.Text = "🟢 O(1) ENGINE (Buffers + Culling)"
statusLabel.TextColor3 = Color3.fromRGB(100, 255, 100)
fpsLabel.TextColor3 = Color3.fromRGB(50, 255, 100)
local avgO1 = TrackFPS(TEST_DURATION, function(t)
for i = 1, COUNT do
local px, py, pz = positionBuffer:ReadPosition(i)
local newY = O1.Math.FastSin((t + (i*0.01)) * 57) * 5
local currentPos = Vector3.new(px, newY, pz)
if O1.Instances.IsVisible(currentPos, RENDER_DISTANCE) then
v2CFrames[i] = CFrame.new(currentPos)
else
v2CFrames[i] = CFrame.new(0, 100000, 0) -- Frustum Culling teleport
end
end
-- Single C++ Bridge Call
O1.Instances.BulkMove(v2Parts, v2CFrames)
end)
-- CONCLUSION SCREEN
v2Folder.Parent = nil
statusLabel.Text = "🏆 BENCHMARK COMPLETE"
statusLabel.TextColor3 = Color3.fromRGB(255, 215, 0) -- Gold
fpsLabel.Text = "Standard: " .. avgStandard .. " FPS | O(1): " .. avgO1 .. " FPS"
fpsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)