apache / apache/fory

[Protocol] variable-size data inline at fixed-size region

Open
#394 0 comments 0 reactions 0 assignees View on GitHub
enhancement protocol
Dominant language
Java
Stars
4.5k
Forks
443
Avg merge
6h 3m
Merged PRs (30d)
74

Description

## Is your feature request related to a problem? Please describe.
The row format implemented in #331 stores variable-size data in separate region, then stores the offset and size in variable region, which is not optimial:
- Separate region may be not close to fixed-region, there may introduce cache miss
- If the data is small, such as smaller than 7 bytes, then it can be stored in fixed-size region, storing it at variable-size region will waste space too.

## Describe the solution you'd like
```
8 bytes in fixed-size region:
|....meta header ....|........|........|........|........|........|........|........|
the first bit can be used to flag whether inline, remaining bits in this byte can
be used for meta such as length and encoding . Remaing 7 bytes will be used for storing data.
```

## Additional context
#314

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.