Skip to content

Commit

Permalink
Bumped sdk version, updated deps, improved code.
Browse files Browse the repository at this point in the history
`Eterl` nows implements `Codec`
  • Loading branch information
Rapougnac committed May 28, 2024
1 parent 84961f5 commit bfda03d
Show file tree
Hide file tree
Showing 7 changed files with 1,184 additions and 36 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Eterl is a fast packer and unpacker for the External Term Erlang Format (version 131).

## Example

```dart
import 'package:eterl/eterl.dart';
Expand All @@ -25,3 +26,33 @@ void main() {
- `Map`s
- `List`s
- `Tuple`s (only while decoding, tuples are converted into a `List`)

## Benchmarks

`dart run benchmark/eterl_benchmark.dart`

```shell
[210ms:142us] Encoder: hello world
mean: 0.15 ± 0.11 us, median: 0.13 ± 0.017 us
▉▂▄▂__________ 110 _____ sample size: 100 (averaged over 225 runs)

[243ms:186us] Encoder: data
mean: 2.59 ± 0.76 us, median: 2.28 ± 0.24 us
▆▉▄▂________________▁_______ sample size: 79 (averaged over 199 runs)

[274ms:047us] Encoder: Complex data
mean: 49.75 ± 12.45 us, median: 42.58 ± 14.93 us
▉▁▁▁_ sample size: 28 (averaged over 46 runs)

[206ms:551us] Decoder: hello world
mean: 0.23 ± 0.12 us, median: 0.17 ± 0.10 us
▉_▄▁_____________ sample size: 100 (averaged over 188 runs)

[243ms:790us] Decoder: data
mean: 3.60 ± 1.17 us, median: 2.91 ± 1.46 us
▉▆▁▁▃_ sample size: 75 (averaged over 165 runs)

[266ms:378us] Decoder: Complex data
mean: 158.66 ± 312.078 us, median: 63.87 ± 12.28 us
▉▅▁_▁____ 149 _____ sample size: 27 (averaged over 28 runs)
```
Loading

0 comments on commit bfda03d

Please sign in to comment.