miden-vm
miden-vm copied to clipboard
Implement`adv.push_smtset` and `adv.push_smtget`
Prior to #1215, these instructions worked with the TieredSmt
. They are currently not used in the smt
implementation, but could be useful to improve performance.
Originally posted by @bobbinth in https://github.com/0xPolygonMiden/miden-vm/pull/1215#discussion_r1468429893
I would keep them here but remove comments. The reason is that using these instructions we can optimize the implementation further. The way to do it is to pre-load advice info onto the advice stack here so that MASM code needs to do fewer
adv.push_mapvaln
operations (and associated stack manipulations). We can also use this to put binary flags onto the advice stack to flatten control flow a bit.My rough guess is that by using these techniques we could probably reduce cycle count of
smt::set
by 10% - 20%. The case ofsmt::get
is not clear - savings there will probably be pretty small. But we can determine this and act accordingly in another PR.So, let's create an issue for this.
Hello! I had a brief chat with @bobbinth about this. I believe the objective here more or less is to load the SMT leaf preimage and size onto the advice stack so that the miden assembly doesn't have to via adv.push_mapvaln
.
I'd like to take a pass at this given, and as confirmed by @bobbinth, this is a low priority issue. Thanks!
@Raneet10 - thanks again! I've assigned this issue to you.