Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: cache code chunk evaluations to reduce the amount of address evals #122

Merged
merged 3 commits into from
Aug 11, 2022

Conversation

gballet
Copy link
Owner

@gballet gballet commented Aug 11, 2022

No description provided.

@gballet gballet marked this pull request as ready for review August 11, 2022 11:27
@gballet gballet requested a review from holiman as a code owner August 11, 2022 11:27
@gballet
Copy link
Owner Author

gballet commented Aug 11, 2022

Before:

INFO [08-10|12:31:19.195] Imported new chain segment               blocks=34   txs=4658 mgas=259.478 elapsed=8.266s    mgasps=31.389 number=5,644,146 hash=da260e..bbbddc age=4y3mo1w dirty=254.79MiB                                                                                                                                                                                                                                
INFO [08-10|12:31:27.302] Imported new chain segment               blocks=32   txs=4120 mgas=235.838 elapsed=8.107s    mgasps=29.090 number=5,644,178 hash=6b7ba8..a379ea age=4y3mo1w dirty=253.32MiB                                                                                                                                                                                                                                
INFO [08-10|12:31:35.521] Imported new chain segment               blocks=30   txs=3478 mgas=231.990 elapsed=8.219s    mgasps=28.224 number=5,644,208 hash=ded384..e3fc3d age=4y3mo1w dirty=250.70MiB                                                                                                                                                                                                                                
INFO [08-10|12:31:43.678] Imported new chain segment               blocks=32   txs=3204 mgas=240.207 elapsed=8.156s    mgasps=29.450 number=5,644,240 hash=c35b7e..be9149 age=4y3mo1w dirty=245.01MiB                                                                                                                                                                                                                                
INFO [08-10|12:31:51.838] Imported new chain segment               blocks=28   txs=2974 mgas=217.044 elapsed=8.159s    mgasps=26.599 number=5,644,268 hash=c19d95..3f8445 age=4y3mo1w dirty=242.55MiB                                                                                                                                                                                                                                
INFO [08-10|12:32:00.067] Imported new chain segment               blocks=31   txs=3801 mgas=236.047 elapsed=8.229s    mgasps=28.684 number=5,644,299 hash=7df5b4..590431 age=4y3mo1w dirty=247.51MiB                                                                                                                                                                                                                                
INFO [08-10|12:32:08.168] Imported new chain segment               blocks=30   txs=4108 mgas=239.745 elapsed=8.101s    mgasps=29.594 number=5,644,329 hash=566269..198147 age=4y3mo1w dirty=255.27MiB                                                                                                                                                                                                                                
INFO [08-10|12:32:16.197] Imported new chain segment               blocks=32   txs=4524 mgas=240.643 elapsed=8.029s    mgasps=29.970 number=5,644,361 hash=e39db2..b61d2f age=4y3mo1w dirty=255.88MiB 

After:

INFO [08-11|11:26:56.735] Imported new chain segment               blocks=41   txs=6425 mgas=302.010 elapsed=8.144s    mgasps=37.081 number=5,644,095 hash=57c4bf..f1ba67 age=4y3mo2w dirty=254.70MiB               
INFO [08-11|11:27:04.747] Imported new chain segment               blocks=42   txs=6328 mgas=326.721 elapsed=8.011s    mgasps=40.779 number=5,644,137 hash=da1482..d6d975 age=4y3mo2w dirty=255.16MiB               
INFO [08-11|11:27:12.822] Imported new chain segment               blocks=43   txs=5408 mgas=320.132 elapsed=8.075s    mgasps=39.643 number=5,644,180 hash=1ef115..778e41 age=4y3mo2w dirty=253.58MiB               
INFO [08-11|11:27:20.854] Imported new chain segment               blocks=40   txs=4532 mgas=311.860 elapsed=8.032s    mgasps=38.827 number=5,644,220 hash=35c15d..318185 age=4y3mo2w dirty=249.24MiB               
INFO [08-11|11:27:29.021] Imported new chain segment               blocks=42   txs=4179 mgas=313.518 elapsed=8.166s    mgasps=38.392 number=5,644,262 hash=471144..61307f age=4y3mo2w dirty=242.35MiB               
INFO [08-11|11:27:37.180] Imported new chain segment               blocks=39   txs=4718 mgas=299.956 elapsed=8.159s    mgasps=36.761 number=5,644,301 hash=60d7dc..0b089d age=4y3mo2w dirty=248.24MiB               
INFO [08-11|11:27:45.319] Imported new chain segment               blocks=43   txs=5955 mgas=328.626 elapsed=8.138s    mgasps=40.377 number=5,644,344 hash=fad7b4..eea1e7 age=4y3mo2w dirty=255.34MiB 

The speedup is noticeable, in terms of mgas/s

@gballet
Copy link
Owner Author

gballet commented Aug 11, 2022

More than halved the number of calls to (*Element).Inverse

profile005

@gballet gballet merged commit 42cce71 into chunkify-at-the-end Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant