MCPcopy Create free account
hub / github.com/ceifa/wasmoon / insertComplexObjectsWithoutProxy

Function insertComplexObjectsWithoutProxy

bench/steps.js:79–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79const insertComplexObjectsWithoutProxy = async () => {
80 const state = await new wasmoon.LuaFactory().createEngine({
81 enableProxy: false,
82 })
83 const obj1 = {
84 hello: 'world',
85 }
86 obj1.self = obj1
87 const obj2 = {
88 hello: 'everybody',
89 array: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
90 fn: () => {
91 return 'hello'
92 },
93 }
94 obj2.self = obj2
95
96 console.time('Insert complex objects without proxy')
97 state.global.set('obj', { obj1, obj2 })
98 console.timeEnd('Insert complex objects without proxy')
99}
100
101const getComplexObjects = async () => {
102 const state = await new wasmoon.LuaFactory().createEngine()

Callers

nothing calls this directly

Calls 2

createEngineMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected