Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace pydantic with msgspec #8

Merged
merged 1 commit into from
Feb 3, 2025
Merged

fix: replace pydantic with msgspec #8

merged 1 commit into from
Feb 3, 2025

Conversation

Ravencentric
Copy link
Owner

This ends up giving us a 1.5x speed improvement

❯ hyperfine --warmup 1 ".\old\Scripts\python.exe test_nzb_old.py" ".\.venv\Scripts\python.exe test_nzb.py"
Benchmark 1: .\old\Scripts\python.exe test_nzb_old.py
  Time (mean ± σ):      6.042 s ±  0.295 s    [User: 5.752 s, System: 0.259 s]
  Range (min … max):    5.754 s …  6.413 s    10 runs

Benchmark 2: .\.venv\Scripts\python.exe test_nzb.py
  Time (mean ± σ):      3.902 s ±  0.019 s    [User: 3.624 s, System: 0.222 s]
  Range (min … max):    3.871 s …  3.930 s    10 runs

Summary
  .\.venv\Scripts\python.exe test_nzb.py ran
    1.55 ± 0.08 times faster than .\old\Scripts\python.exe test_nzb_old.py

This ends up giving us a 1.5x speed improvement

```
❯ hyperfine --warmup 1 ".\old\Scripts\python.exe test_nzb_old.py" ".\.venv\Scripts\python.exe test_nzb.py"
Benchmark 1: .\old\Scripts\python.exe test_nzb_old.py
  Time (mean ± σ):      6.042 s ±  0.295 s    [User: 5.752 s, System: 0.259 s]
  Range (min … max):    5.754 s …  6.413 s    10 runs

Benchmark 2: .\.venv\Scripts\python.exe test_nzb.py
  Time (mean ± σ):      3.902 s ±  0.019 s    [User: 3.624 s, System: 0.222 s]
  Range (min … max):    3.871 s …  3.930 s    10 runs

Summary
  .\.venv\Scripts\python.exe test_nzb.py ran
    1.55 ± 0.08 times faster than .\old\Scripts\python.exe test_nzb_old.py
```
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0846a73) to head (d17e8b1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #8   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        10    -1     
  Lines          597       600    +3     
=========================================
+ Hits           597       600    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Ravencentric Ravencentric merged commit 6370baa into main Feb 3, 2025
7 checks passed
@Ravencentric Ravencentric deleted the msgspec branch February 3, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant