This ticket tracks a list of possible improvements for the public VM and the reasoning behind every item (ordered by need!):
### Wishlist
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/7054
- [x] **Adding integer division for fields**. This one is needed to be able to perform to_radix. to_radix is used to decompose a field in an array of items that go from 0 to radix. This is implemented via a loop of integer divisions.
- [x] **LT/LTE opcode support for field type.** Brillig range checks are implemented as field comparisons thus requiring LT/LTE over fields.
- [x] **Allow the set opcode to have inTag of field**. It's very typical that we create field constants where the actual value is less than 128 bits, to operate with it as a field. This would save some cast opcodes that aren't really necessary.
- [ ] **Adding a relative direct addressing mode**. If we have relative addressing, we can efficiently implement having a proper stack instead of the current solution of just having one stack frame that we dump/restore to heap on every internal call.
- [ ] **Adding a relative indirect addressing mode**. If we have both relative direct and relative indirect we can operate efficiently with all the items in the stack, being them pointers or immediate values.
Most of these items have workarounds but implementing them would enable the compiler to generate smaller bytecodes for the same programs.
This ticket tracks a list of possible improvements for the public VM and the reasoning behind every item (ordered by need!):
Most of these items have workarounds but implementing them would enable the compiler to generate smaller bytecodes for the same programs.