Remix.run Logo
thomasmg 4 hours ago

You could use "local.tee". It is kind of is "store" + "duplicate".

asibahi 4 hours ago | parent [-]

`local.tee` doesn't duplicate. it just doesn't remove the value from the stack. (so it is "just" `local.set` followed by `local.get`)

thomasmg 3 hours ago | parent [-]

Sure. But it does save you one instruction: "tee", "get" instead of "set", "get", "get".