-
@Robbepop is there a way to turn off this feature? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I think you are referring to this issue concerning your question: Constant folding is an integral part of Wasmi's bytecode translation. In fact it plays a crucial role in Wasmi bytecode compression since without it, Wasmi bytecode was required to be able to represent more states and thus being less (space) efficient. In other words: constant folding allows us to shrink the number of required Wasmi bytecode instructions significantly. Where is your question coming from? What do you want to achieve by turning off constant folding? |
Beta Was this translation helpful? Give feedback.
-
I was just wondering if It could be turned off since when you guys did the stack based approach (and not the register based approach), the engine did not do any of this constants folding |
Beta Was this translation helpful? Give feedback.
-
Yes, it did not do that before. However, it technically could have done it with a different set of bytecode instructions based on a stack-machine execution model. However, the old Wasmi version was trying to be as simple as possible at the cost of execution performance. |
Beta Was this translation helpful? Give feedback.
I think you are referring to this issue concerning your question:
#1092
Constant folding is an integral part of Wasmi's bytecode translation. In fact it plays a crucial role in Wasmi bytecode compression since without it, Wasmi bytecode was required to be able to represent more states and thus being less (space) efficient. In other words: constant folding allows us to shrink the number of required Wasmi bytecode instructions significantly.
Where is your question coming from? What do you want to achieve by turning off constant folding?
You should be aware that constant folding is just one of many optimizations that Wasmi applies to Wasm bytecode during the translation procedure.