CameraScript Could Use Some Optimizations For Indexing

In that regard, here’s a useful book.

Has anyone tried reading the camera code?

1 Like

Last time I tried reading it found myself running around in circles trying to figuring out how something worked. That was probably close to a year ago though.

I have.

1 Like

local t = tick()

for i = 0, 30000000 do
local v = Vector3.new(i, i, i)
end

print(tick()-t)

t = tick()

local Vector3new = Vector3.new

for i = 0, 30000000 do
local v = Vector3new(i, i, i)
end

print(tick()-t)

11.734779119492
11.218322038651

I’m not seeing the improvements you are seeing?

Adding wait(3) made the difference about 1.2 seconds for me.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.