Avatar for the pydantic user
pydantic
httpx2
BlogDocsChangelog

perf: use memoryview in write() to avoid copies

#954
Comparing
mbeijen:perf/memoryview-write
(
519a8d6
) with
main
(
8d5f182
)
CodSpeed Performance Gauge
-10%
Regression
1
Untouched
6

Benchmarks

7 total
test_bench_client_stream_download
tests/test_benchmark.py
CodSpeed Performance Gauge
-10%
28.2 ms31.3 ms
test_bench_sync_stream_write_large
tests/test_benchmark.py
CodSpeed Performance Gauge
0%
242.3 ms242.5 ms
test_bench_client_post_large_json
tests/test_benchmark.py
CodSpeed Performance Gauge
-2%
217.9 ms222.3 ms
test_bench_url_join
tests/test_benchmark.py
CodSpeed Performance Gauge
-2%
168.3 ms172.5 ms
test_bench_response_gzip_decode_large
tests/test_benchmark.py
CodSpeed Performance Gauge
-6%
35.5 ms37.7 ms
test_bench_request_multipart
tests/test_benchmark.py
CodSpeed Performance Gauge
-6%
15.9 ms16.9 ms
test_bench_request_json_post
tests/test_benchmark.py
CodSpeed Performance Gauge
-6%
85.6 ms91 ms

Commits

Click on a commit to change the comparison range
Base
main
8d5f182
-2.04%
perf: use memoryview in write() to avoid copies
f42a743
8 hours ago
by mbeijen
-8%
Merge branch 'main' into perf/memoryview-write
519a8d6
4 hours ago
by Kludex
© 2026 CodSpeed Technology
Home Terms Privacy Docs