• Stars
    star
    171
  • Rank 221,601 (Top 5 %)
  • Language
    Rust
  • License
    Other
  • Created over 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A data structure to efficiently intern, cache and restore strings.

String Interner

Continuous Integration Test Coverage Documentation Crates.io
travisCI codecov docs crates

A data structure to cache strings efficiently, with minimal memory footprint and the ability to assicate the interned strings with unique symbols. These symbols allow for constant time comparisons and look-ups to the underlying interned string contents. Also, iterating through the interned strings is cache efficient.

Contributing

Testing

Test the project using

cargo test --release

Memory Allocation Tests

To further test memory consumption and allocations performed by the different string interner backends test the project as follows:

cargo test --release --features test-allocations -- --test-threads 1
  • The --features test-allocations enables the memory allocations tests.
  • The --test-thread 1 argument is required for the memory allocations tests since otherwise they interfere with each other causing them to randomly fail.
  • Use --nocapture to receive verbose output useful for debugging.

Profiling & Benchmarks

Benchmark the string interner and its various backends using

cargo bench

License

Licensed under either of

at your option.

Dual licence: badge badge

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

More Repositories

1

modular-bitfield

Macro to generate bitfields for structs that allow for modular use of enums.
Rust
160
star
2

prophet

A simple neural net implementation.
Rust
39
star
3

stevia

A simple (unfinished) SMT solver for QF_ABV.
Rust
35
star
4

apint

Arbitrary precision integers library.
Rust
27
star
5

enum-tag

Proc. macro to generate C-like `enum` tags.
Rust
13
star
6

dynarray

Adjusted implementation of std::experimental::dynarray without stack allocation.
C++
12
star
7

runwell

An experimental WebAssembly virtual machine.
Rust
12
star
8

dimacs-parser

Utilities to parse files in DIMACS format which is the de-facto standard for input to SAT solvers.
Rust
8
star
9

clpp

A thin header-only wrapper around OpenCL 2.0+ for modern and highlevel C++.
C++
4
star
10

cionc

The toy-compiler for the Cion programming language.
Rust
4
star
11

union-fn

Proc macros for union function data structure.
Rust
4
star
12

enum-codec

Space-efficient codec for Rust `enum` types.
Rust
4
star
13

intx

Rust
3
star
14

non-pdsl-example

One of the most simplest smart contracts written without the pDSL
Rust
3
star
15

cnf-parser

Efficient and customizable CNF parser for SAT solving.
Rust
3
star
16

state_ptr

A pointer that allows to store state into unused bits of the address.
C++
3
star
17

bucket_vec

A vector-like collection that guarantees not to move its internal elements.
Rust
3
star
18

cionc-old

The compiler front end for the Cion programming language.
C++
2
star
19

indexmap-nostd

A `no_std` implementation of the `indexmap` crate.
Rust
2
star
20

two-phase-structure

A repo that describes a smart contract structure for the planned two-phase compilation approach.
Rust
2
star
21

addressable-pairing-heap

An addressable pairing heap implementation for Rust.
Rust
1
star
22

tyname

Retrieve type names during program execution on stable Rust.
Rust
1
star
23

wasm_kernel

A Wasm kernel for benchmarking wasmi.
Rust
1
star
24

rust_m3

An attempt at building a threaded code interpreter architecture in Rust.
Rust
1
star
25

enum-ref

Proc. macro for generating reference wrappers for Rust `enum` types.
Rust
1
star
26

interpreter-dispatch-research

Some research on efficient interpreter instruction dispatch in Rust.
Rust
1
star
27

ipasir-rs

FFI bindings for the IPASIR incremental SAT solver interface.
Rust
1
star
28

multi-stash

A vector-like data structure that reuses slots for new elements.
Rust
1
star