Skip to content

Conversation

@danyalprout
Copy link
Collaborator

@danyalprout danyalprout commented Nov 10, 2025

📝 Summary

RPC's to send metering information to op-rbuilder. To make sure this never blocks the build loop, I did a handful of comparisons between different datastructures/locks:

Approach Avg Time Max Read Time ns Max Read Time ms
Dual Map & Periodic Swap** 239ns 70292ns 0.07 ms
Dashmap ✅ 669ns 93709ns 0.094 ms
HashMap (rwlock) 647ns 1433us 1.43ms
HashMap (mutex) 673ns 1441625ns 1.44ms

** This was a custom implementation and while the fastest, I felt like the additional code wasn't worth it over using a DashMap it also has the downside of not being a live view on the data (whereas dashmap is)

💡 Motivation and Context


✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@danyalprout danyalprout marked this pull request as ready for review November 12, 2025 19:41
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.

2 participants