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

Function insertComplexObjects

bench/steps.js:59–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57}
58
59const insertComplexObjects = async () => {
60 const state = await new wasmoon.LuaFactory().createEngine()
61 const obj1 = {
62 hello: 'world',
63 }
64 obj1.self = obj1
65 const obj2 = {
66 hello: 'everybody',
67 array: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
68 fn: () => {
69 return 'hello'
70 },
71 }
72 obj2.self = obj2
73
74 console.time('Insert complex objects')
75 state.global.set('obj', { obj1, obj2 })
76 console.timeEnd('Insert complex objects')
77}
78
79const insertComplexObjectsWithoutProxy = async () => {
80 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