bench: UDMF TEXTMAP and .proc parse lines
This commit is contained in:
1 parent
0f0da6e8ea
commit
b4f4966c6f
1 file changed
+21
@@ -1258,6 +1258,27 @@ do
|
||||
Wad.map(w, "MAP01", { textures = false })
|
||||
end)
|
||||
end
|
||||
do
|
||||
-- id Tech text (ws-idtech): Freedoom MAP01 as a UDMF TEXTMAP (tools/fixtures/udmf.py) parsed to tables and built
|
||||
-- into a Scene, a Doom 3 .proc (tools/fixtures/proc.py) to a Scene; MB/s of text
|
||||
local DoomMap = require("@rosetta/codecs/model/DoomMap")
|
||||
local Udmf = require("@rosetta/model/udmf")
|
||||
local Proc = require("@rosetta/model/proc")
|
||||
local UD = require("@tests/gen/udmf")
|
||||
local PR = require("@tests/gen/proc")
|
||||
bench("udmf MAP01 TEXTMAP -> tables", 3, #UD.text, function()
|
||||
DoomMap.udmf(UD.text)
|
||||
end)
|
||||
local ub = buffer.fromstring(UD.text)
|
||||
bench("udmf MAP01 TEXTMAP -> Scene", 3, #UD.text, function()
|
||||
Udmf.decode(Bytes.reader(ub))
|
||||
end)
|
||||
local big = PR.doom3.text
|
||||
local pb = buffer.fromstring(big)
|
||||
bench("proc (" .. #big .. " B) -> Scene", 20, #big, function()
|
||||
Proc.decode(Bytes.reader(pb))
|
||||
end)
|
||||
end
|
||||
do
|
||||
-- Draco (codecs/model/Draco): the Stanford bunny (35k points, 69k faces, Edgebreaker valence, normals) and a UV
|
||||
-- sphere with seams; MB/s of decoded output (u32 indices + f32 attributes per point), plus triangles per second.
|
||||
|
||||
Reference in new issue
Block a user