-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi there,
Recently, I created an example of swap weth/usdc with a uniswap v2 pair. I compiled all the required contracts in build.rs and also I created related functions using extern_revmc!
I epxected a speed up of at least 3-4 times in compare with interpreter mode, but it only achieves about %20-30 speed up.
I shared the source code and appreciate any suggestion or fix, if I used the feature in a wrong way. Another thing I noticed, all examples (as benches) in repo, are related to contracts without any i/o and storage read. Maybe, this factor affect the performance, because in a swap of uni v2, it needs to fetch some data.
Note: I used cache db and provided a warm up stage, that all needed data were fetched and cahced into CacheDB.
impl link: https://github.com/jafar75/revmc/tree/main/examples/univ2_swap
Thanks.