validate the mandel test

Dibyendu Majumdar 9 years ago
parent 74e2a829d1
commit d9a7cbf340

@ -7,7 +7,7 @@ local height, wscale = width, 2/width
local m, limit2 = 50, 4.0
local write, char = io.write, string.char
write("P4\n", width, " ", height, "\n")
--write("P4\n", width, " ", height, "\n")
t1 = os.clock()
for y=0,height-1 do
local Ci = 2*y / height - 1
@ -34,7 +34,7 @@ for y=0,height-1 do
for x=width,xbb do bits = bits + bits + 1 end
end
-- write(char(255-bits))
-- print(bits);
--print(bits);
end
end
t2 = os.clock()

@ -8,7 +8,7 @@ local height :int, wscale :double = width, 2.0/width
local m:int, limit2 :double = 50, 4.0
local write, char = io.write, string.char
write("P4\n", width, " ", height, "\n")
--write("P4\n", width, " ", height, "\n")
t1 = os.time()
for y=0,height-1 do
local Ci :double = 2.0*y / height - 1
@ -41,7 +41,7 @@ for y=0,height-1 do
for x=width,xbb do bits = bits + bits + 1 end
end
-- write(char(255-bits))
-- print(bits);
--print(bits);
end
end
t2 = os.time()

@ -3,7 +3,7 @@
-- contributed by Mike Pall
local function domandel()
local function domandel(pfunc)
local width :int = 4000
local height :int, wscale :double = width, 2.0/width
local m:int, limit2 :double = 50, 4.0
@ -39,13 +39,17 @@ local function domandel()
if xbb >= width then
for x=width,xbb do bits = bits + bits + 1 end
end
--pfunc(bits)
end
end
end
domandel()
local function dummy(x)
end
domandel(dummy)
t1 = os.clock()
domandel()
domandel(print)
t2 = os.clock()
print(t2-t1)

Loading…
Cancel
Save