From 3b89f3a2d30e473ac9a0f1287d831d0ff59a1af2 Mon Sep 17 00:00:00 2001 From: Eden Kirin Date: Wed, 11 Oct 2023 21:29:27 +0200 Subject: [PATCH] Readme --- README.md | 9 +++++++++ benchmark/msgspec_benchmark/benchmark.py | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 911094d..75b4118 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Libs used for benchmark: - [pydantic 2.4.2](https://docs.pydantic.dev/latest/) - [msgspec 0.18.4](https://jcristharif.com/msgspec/index.html) +Note that Pydantic used in benchmark is v2 which should be dozen of times faster than Pydantic v1. I have no time to waste benchmarking Pydantic v1. + ## Usage ### Install virtual environment @@ -50,4 +52,11 @@ Finished in 1.725s ╚██╔╝ ██║ ██║██║ ██║ ╚════██║██║ ██║██║ ██╔═██╗ ██╔══██╗██╔══██║██║ ██║ ╚════██║ ██║ ╚██████╔╝╚██████╔╝ ███████║╚██████╔╝╚██████╗██║ ██╗ ██████╔╝██║ ██║███████╗███████╗███████║ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ + +██████╗ ██╗ ██████╗ ████████╗██╗███╗ ███╗███████╗ +██╔══██╗██║██╔════╝ ╚══██╔══╝██║████╗ ████║██╔════╝ +██████╔╝██║██║ ███╗ ██║ ██║██╔████╔██║█████╗ +██╔══██╗██║██║ ██║ ██║ ██║██║╚██╔╝██║██╔══╝ +██████╔╝██║╚██████╔╝ ██║ ██║██║ ╚═╝ ██║███████╗ +╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ``` diff --git a/benchmark/msgspec_benchmark/benchmark.py b/benchmark/msgspec_benchmark/benchmark.py index 116b0b5..8262dd8 100644 --- a/benchmark/msgspec_benchmark/benchmark.py +++ b/benchmark/msgspec_benchmark/benchmark.py @@ -6,8 +6,4 @@ from benchmark.msgspec_benchmark.models import PlanogramsBulkInputPayload class MsgSpecBenchmark(BenchmarkBase): def _benchmark(self) -> None: test_data = self._read_test_file() - - # decoder = msgspec.json.Decoder(PlanogramsBulkInputPayload).decode - # decoder.loads(test_data) - data = msgspec.json.decode(test_data, type=PlanogramsBulkInputPayload)