# Description of Changes
The goal of this PR is to:
- Make it easy to switch our backing implementation of identifiers, as
seen in the commit changing to `LeanString`.
- Improve type safety of our identifiers by having every identifier
start with `RawIdentifier` and then `Identifier` is just a wrapper with
validation on construction. `TableName` and `ReducerName` are then just
wrappers around `Identifier`.
- Reduce allocation in `InstanceEnv` by using the now clone-on-write
O(1) + SSO optimized `Identifier`.
- Reduce allocations in the query engine as a consequence of improving
`RawIdentifier` and `Identifier`.
- Have `&'static str` strings be further optimized by avoiding to
allocate even for long ones. This is supported by `impl From<&'static
str> for RawIdentifier` as well as switching to `LeanString`.
The PR results in a roughly 2k TPS improvement over master for WASM +
hash indices. This should also help V8, as this is VM-agnostic.
# API and ABI breaking changes
None
# Expected complexity level and risk
3? Mostly just small changes in many places, but in a sea of small
changes, mistakes can happen.
# Testing
Covered by existing tests.
# Description of Changes
Closes#3673
*NOTE*: C++ part will be in another PR
# Expected complexity level and risk
2
Adding a new type touch everywhere
# Testing
- [x] Adding smoke and unit test
---------
Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Jason Larabie <jason@clockworklabs.io>
* Format binary data as hex in sql/satn
* Add json test for identity
* Addressing some PR comments
* Fix test
---------
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
* Document most of SATS
* sats: simplify Serialize impls
* sats: simplify Deserialize impls
* improve sats::de docs
* document sats::bsatn
* simplify sats fmt/map notation
* value serializer: docs + opt
* docs/refactor sats::algebraic_value::{ser,de}
* sats: document serde conversions
* cargo fmt
* small fixes
* fix tests
* fix serde feature
* sats: address pheobe's review
* fix doc comment
* fix test failure
* Remove unusued import
* Fix a borrowing issue introduced by the merge of master
The definitions of these were tweaked in some way, I think,
such that references to them are no longer automatically 'static?
---------
Co-authored-by: George Kulakowski <george@clockworklabs.io>