intel / rohd

The Rapid Open Hardware Development (ROHD) framework is a framework for describing and verifying hardware in the Dart programming language.
https://intel.github.io/rohd-website
BSD 3-Clause "New" or "Revised" License
370 stars 65 forks source link

Performance fixes: wrong collections and unmodifiable views causing inefficiencies #492

Closed mkorbel1 closed 2 months ago

mkorbel1 commented 2 months ago

Description & Motivation

See #489 for the initial bug which started this PR.

This PR includes changes to support efficient iteration and search through collections in multiple APIs where incorrect usage of collections and unmodifiable views could cause severe performance issues for large numbers of elements.

Also, this adds an UnmodifiableTraverseableCollectionView to help support the use cases.

Related Issue(s)

Fix #489

Testing

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

Only performance changes should be visible in existing APIs.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No