Skip to content

Commit

Permalink
Add to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aandres committed Oct 15, 2024
1 parent 6707ee4 commit 70a315d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,35 @@ messages_back: list[SearchRequest] = [
]
```

## Benchmark against protarrow

[Ptars](https://github.com/0x26res/ptars) is a rust implementation of
[protarrow](https://github.com/tradewelltech/protarrow),
which is implemented in plain python.
It is:

- marginally faster when converting from proto to arrow.
- About 3 times faster when converting from arrow to proto.

<!-- markdownlint-disable MD013 -->
```benchmark
----------------------------------------------------------------------------- benchmark 'to_arrow': 2 tests -----------------------------------------------------------------------------
Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_ptars_to_arrow 7.1125 (1.0) 8.2581 (1.0) 7.2747 (1.0) 0.1299 (1.0) 7.2498 (1.0) 0.1243 (1.0) 20;5 137.4636 (1.0) 134 1
test_protarrow_to_arrow 7.1563 (1.01) 20.4630 (2.48) 8.7641 (1.20) 3.8860 (29.92) 7.3423 (1.01) 0.2286 (1.84) 14;16 114.1022 (0.83) 122 1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------ benchmark 'to_proto': 2 tests -------------------------------------------------------------------------------
Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_ptars_to_proto 6.3732 (1.0) 6.9871 (1.0) 6.6027 (1.0) 0.1234 (1.0) 6.5784 (1.0) 0.1547 (1.0) 47;3 151.4530 (1.0) 150 1
test_protarrow_to_proto 18.8678 (2.96) 31.2787 (4.48) 20.6836 (3.13) 3.8508 (31.19) 19.2683 (2.93) 0.4145 (2.68) 6;6 48.3475 (0.32) 51 1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```
<!-- markdownlint-enable MD013 -->

[pypi-image]: https://img.shields.io/pypi/v/ptars
[pypi-url]: https://pypi.org/project/ptars/
[build-image]: https://github.com/0x26res/ptars/actions/workflows/ci.yaml/badge.svg
Expand Down

0 comments on commit 70a315d

Please sign in to comment.