Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ericeil authored Feb 9, 2024
1 parent 315e3db commit aac4001
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ that are designed to be implemented by efficient immutable collections, along wi
in developing the Certora Prover, we found that the reference implementation did not make the right performance
tradeoffs for our use cases.

Most `Set` and `Map` implementations, including the ones mentioned previously, are optimized primarily for speed of
operations on single elements of the collection, e.g., adding an element to a `Set` or looking up a single value in a
`Map`. However, in many use cases the more performance-critical operations are those that operate over the whole data
structure, such computing set unions or intersection of two sets, or merging two maps.
Most collection implementations, including the ones mentioned previously, are optimized primarily for speed of
operations on single elements of the collection, e.g., adding an element to a `Set`, looking up a single value in a
`Map`, getting a single `List` element by index. However, in many use cases the more performance-critical operations are
those that operate over the whole data structure, such computing set unions or intersection of two sets, or merging two
maps.

The Certora Collections library provides `Set` and `Map` implementations which are optimized primarily for such
operations. Further, we optimize heavily for memory usage over speed of operations on single elements. We also provide
some additional features that we have found useful in the Certora Prover, such as efficient parallel operations.
The Certora Collections library provides `Set` and `Map` and `List` implementations which are optimized primarily for
such operations. Further, we optimize heavily for memory usage over speed of operations on single elements. We also
provide some additional features that we have found useful in the Certora Prover, such as efficient parallel operations.

## Usage

Expand All @@ -31,8 +32,7 @@ The Certora Collections library is available on [JitPack](https://jitpack.io/#ce

The API builds on the interfaces provided by [kotlinx.collections.immutable]. See The Kotlin Immutable Collections
[proposal](https://github.com/Kotlin/kotlinx.collections.immutable/blob/master/proposal.md). We provide some additional
interfaces above the `PersistentMap` and `PersistentSet` interfaces provided by `kotlinx.collections.immutable`:

-

methods beyond the `PersistentMap`, `PersistentSet`, and `PersistentList` interfaces provided by
`kotlinx.collections.immutable`, in the `TreapMap`, `TreapSet`, and `TreapList` interfaces.

To create instances of these collections, use the functions `treapMapOf`, `treapSetOf`, and `treapListOf`.

0 comments on commit aac4001

Please sign in to comment.