Open nidhhoggr opened 1 year ago
nvm, for the ownerOf benchmark. I can now see that the reports for ERC721A are still variable with the existing benchmarks. The only difference however is that my implementation above demonstrates significantly higher gas usage when querying the ownerOf from ERC721A at a particular index. As such we can probably ignore that for now.
Mint Benchmarks
I think it would be helpful to add a benchmark for safeMint and mint. right now there is only a benchmark for safeMint.
Here is how I handled that: 1) Change the existing mint benchmark to use the mint function https://github.com/nidhhoggr/ERC721Psi/blob/9b7a15fd2a0cf4c4392a26642370d5929ceadfa5/scripts/benchmark_mint.js 2) Add another benchmark script to use the safeMint function https://github.com/nidhhoggr/ERC721Psi/blob/9b7a15fd2a0cf4c4392a26642370d5929ceadfa5/scripts/benchmark_safemint.js
Missing Bitscan benchmark
Next, there is a benchmark for bitscan but it errors because no such Mock exists. As such we should simply delete it. The scanning benchmarking is already abstracted to functions that use it.
ownerOf Benchmark
Is it necessary to benchmark ownerOf in an iterative fashion? Currently the benchmark iterates 16 times but the result is the same. I found that however minting and calling the benchmark function in the same loop produces different results where ERC721A is no longer constant. Should we use this approach instead or remove iterations? Not sure what the intention is but its obvious that ERC721A is less efficient at finding the owner as the gas used becomes variable. I will provide the code and benchmark result below.