Avatar for the aio-libs user
aio-libs
yarl
BlogDocs

Improve performance of calculating the URL hash

#1318Merged
Comparing
hash_pref
(
b7ca114
) with
master
(
6601ba5
)
CodSpeed Performance Gauge
×2.2
Improvements
1
Regressions
0
Untouched
78
New
0
Dropped
0
Ignored
0

Benchmarks

Improved

test_url_hash
tests/test_url_benchmarks.py::test_url_hash
CodSpeed Performance Gauge
×2.2
700.3 µs
324.9 µs

Passed

test_url_make_access_username_password
tests/test_url_benchmarks.py::test_url_make_access_username_password
CodSpeed Performance Gauge
+3%
1.1 ms
1 ms
test_empty_query
tests/test_url_benchmarks.py::test_empty_query
CodSpeed Performance Gauge
+1%
64.7 µs
64.1 µs
test_url_with_scheme
tests/test_url_benchmarks.py::test_url_with_scheme
CodSpeed Performance Gauge
+1%
750.8 µs
743.8 µs
test_query
tests/test_url_benchmarks.py::test_query
CodSpeed Performance Gauge
+1%
64.5 µs
63.9 µs
test_query_string
tests/test_url_benchmarks.py::test_query_string
CodSpeed Performance Gauge
+1%
60.7 µs
60.3 µs
test_url_make_with_ipv4_address_and_path
tests/test_url_benchmarks.py::test_url_make_with_ipv4_address_and_path
CodSpeed Performance Gauge
+1%
833 µs
828 µs
test_unquoter_long_ascii
tests/test_quoting_benchmarks.py::test_unquoter_long_ascii
CodSpeed Performance Gauge
+1%
4.4 ms
4.4 ms
test_url_origin
tests/test_url_benchmarks.py::test_url_origin
CodSpeed Performance Gauge
+1%
97.6 µs
97.1 µs
test_url_make_with_ipv6_address_and_path
tests/test_url_benchmarks.py::test_url_make_with_ipv6_address_and_path
CodSpeed Performance Gauge
0%
973.8 µs
969.2 µs
test_unquoter_long_pct
tests/test_quoting_benchmarks.py::test_unquoter_long_pct
CodSpeed Performance Gauge
0%
7 ms
7 ms
test_url_make_with_ipv6_address_path_and_port
tests/test_url_benchmarks.py::test_url_make_with_ipv6_address_path_and_port
CodSpeed Performance Gauge
0%
1.1 ms
1 ms
test_url_with_name
tests/test_url_benchmarks.py::test_url_with_name
CodSpeed Performance Gauge
0%
1 ms
1 ms
test_url_with_query_to_string
tests/test_url_benchmarks.py::test_url_with_query_to_string
CodSpeed Performance Gauge
0%
369.8 µs
368.4 µs
test_url_with_path_relative
tests/test_url_benchmarks.py::test_url_with_path_relative
CodSpeed Performance Gauge
0%
732.2 µs
729.4 µs
test_url_build_with_host
tests/test_url_benchmarks.py::test_url_build_with_host
CodSpeed Performance Gauge
0%
588.3 µs
586.2 µs
test_url_with_path_parent
tests/test_url_benchmarks.py::test_url_with_path_parent
CodSpeed Performance Gauge
0%
1,001.1 µs
998 µs
test_url_extend_query_existing_query_string
tests/test_url_benchmarks.py::test_url_extend_query_existing_query_string
CodSpeed Performance Gauge
0%
232.3 µs
231.7 µs
test_url_make_empty_password
tests/test_url_benchmarks.py::test_url_make_empty_password
CodSpeed Performance Gauge
0%
918 µs
916.6 µs
test_unquoter_short
tests/test_quoting_benchmarks.py::test_unquoter_short
CodSpeed Performance Gauge
0%
125.6 µs
125.4 µs
test_with_query_mapping
tests/test_url_benchmarks.py::test_with_query_mapping
CodSpeed Performance Gauge
0%
661 µs
660.3 µs
test_url_make_access_raw_host
tests/test_url_benchmarks.py::test_url_make_access_raw_host
CodSpeed Performance Gauge
0%
746 µs
745.2 µs
test_update_query_sequence_mapping
tests/test_url_benchmarks.py::test_update_query_sequence_mapping
CodSpeed Performance Gauge
0%
18.9 ms
18.9 ms
test_url_with_fragment
tests/test_url_benchmarks.py::test_url_with_fragment
CodSpeed Performance Gauge
0%
438.4 µs
438 µs
test_url_with_port
tests/test_url_benchmarks.py::test_url_with_port
CodSpeed Performance Gauge
0%
588.6 µs
588.2 µs
test_with_query_mapping_int_values
tests/test_url_benchmarks.py::test_with_query_mapping_int_values
CodSpeed Performance Gauge
0%
1 ms
1 ms
test_update_query_none
tests/test_url_benchmarks.py::test_update_query_none
CodSpeed Performance Gauge
0%
149.5 µs
149.4 µs
test_url_with_path
tests/test_url_benchmarks.py::test_url_with_path
CodSpeed Performance Gauge
0%
442.1 µs
441.8 µs
test_is_default_port
tests/test_url_benchmarks.py::test_is_default_port
CodSpeed Performance Gauge
0%
188.2 µs
188.1 µs
test_url_make_encoded_with_host_path_and_port
tests/test_url_benchmarks.py::test_url_make_encoded_with_host_path_and_port
CodSpeed Performance Gauge
0%
316.4 µs
316.3 µs
test_url_build_encoded_with_host_and_port
tests/test_url_benchmarks.py::test_url_build_encoded_with_host_and_port
CodSpeed Performance Gauge
0%
499.2 µs
499 µs
test_url_make_with_ipv4_address_path_and_port
tests/test_url_benchmarks.py::test_url_make_with_ipv4_address_path_and_port
CodSpeed Performance Gauge
0%
979.7 µs
979.5 µs
test_update_query_mapping_with_existing_query
tests/test_url_benchmarks.py::test_update_query_mapping_with_existing_query
CodSpeed Performance Gauge
0%
2.6 ms
2.6 ms
test_url_make_access_raw_path
tests/test_url_benchmarks.py::test_url_make_access_raw_path
CodSpeed Performance Gauge
0%
888.4 µs
888.3 µs
test_quoter_quote_utf8
tests/test_quoting_benchmarks.py::test_quoter_quote_utf8
CodSpeed Performance Gauge
0%
392 µs
391.9 µs
test_quote_long_path
tests/test_quoting_benchmarks.py::test_quote_long_path
CodSpeed Performance Gauge
0%
1.8 ms
1.8 ms
test_url_make_no_netloc_relative
tests/test_url_benchmarks.py::test_url_make_no_netloc_relative
CodSpeed Performance Gauge
0%
479.5 µs
479.5 µs
test_long_query
tests/test_quoting_benchmarks.py::test_long_query
CodSpeed Performance Gauge
0%
2.2 ms
2.2 ms
test_quoter_pct
tests/test_quoting_benchmarks.py::test_quoter_pct
CodSpeed Performance Gauge
0%
145.1 µs
145.1 µs
test_long_query_with_pct
tests/test_quoting_benchmarks.py::test_long_query_with_pct
CodSpeed Performance Gauge
0%
9.6 ms
9.6 ms
test_url_make_with_many_hosts
tests/test_url_benchmarks.py::test_url_make_with_many_hosts
CodSpeed Performance Gauge
0%
5.7 ms
5.7 ms
test_url_extend_query_existing_query_simple_query_dict
tests/test_url_benchmarks.py::test_url_extend_query_existing_query_simple_query_dict
CodSpeed Performance Gauge
0%
683.3 µs
683.4 µs
test_quote_query_string
tests/test_quoting_benchmarks.py::test_quote_query_string
CodSpeed Performance Gauge
0%
147 µs
147 µs
test_url_with_password
tests/test_url_benchmarks.py::test_url_with_password
CodSpeed Performance Gauge
0%
606.2 µs
606.3 µs
test_url_equality
tests/test_url_benchmarks.py::test_url_equality
CodSpeed Performance Gauge
0%
784.6 µs
784.8 µs
test_url_to_string
tests/test_url_benchmarks.py::test_url_to_string
CodSpeed Performance Gauge
0%
316.5 µs
316.6 µs
test_update_query_mapping
tests/test_url_benchmarks.py::test_update_query_mapping
CodSpeed Performance Gauge
0%
2.4 ms
2.4 ms
test_extend_query_subclassed_str
tests/test_url_benchmarks.py::test_extend_query_subclassed_str
CodSpeed Performance Gauge
0%
1 ms
1 ms
test_url_build_with_different_hosts
tests/test_url_benchmarks.py::test_url_build_with_different_hosts
CodSpeed Performance Gauge
0%
1.9 ms
1.9 ms
test_url_make_empty_username
tests/test_url_benchmarks.py::test_url_make_empty_username
CodSpeed Performance Gauge
0%
925.6 µs
926.3 µs
test_url_make_with_host_path_and_port
tests/test_url_benchmarks.py::test_url_make_with_host_path_and_port
CodSpeed Performance Gauge
0%
943.5 µs
944.3 µs
test_url_build_access_username_password
tests/test_url_benchmarks.py::test_url_build_access_username_password
CodSpeed Performance Gauge
0%
979 µs
980 µs
test_url_build_access_fragment
tests/test_url_benchmarks.py::test_url_build_access_fragment
CodSpeed Performance Gauge
0%
720.1 µs
720.8 µs
test_url_joinpath_encoded
tests/test_url_benchmarks.py::test_url_joinpath_encoded
CodSpeed Performance Gauge
0%
867.9 µs
868.8 µs
test_url_with_user
tests/test_url_benchmarks.py::test_url_with_user
CodSpeed Performance Gauge
0%
595.6 µs
596.3 µs
test_with_query_empty
tests/test_url_benchmarks.py::test_with_query_empty
CodSpeed Performance Gauge
0%
233.7 µs
233.9 µs
test_url_make_access_fragment
tests/test_url_benchmarks.py::test_url_make_access_fragment
CodSpeed Performance Gauge
0%
839.1 µs
840.1 µs
test_url_extend_query_simple_query_dict
tests/test_url_benchmarks.py::test_url_extend_query_simple_query_dict
CodSpeed Performance Gauge
0%
662.7 µs
663.6 µs
test_quoter_ascii
tests/test_quoting_benchmarks.py::test_quoter_ascii
CodSpeed Performance Gauge
0%
72.7 µs
72.8 µs
test_url_with_host
tests/test_url_benchmarks.py::test_url_with_host
CodSpeed Performance Gauge
0%
742.3 µs
743.6 µs
test_url_build_access_raw_path
tests/test_url_benchmarks.py::test_url_build_access_raw_path
CodSpeed Performance Gauge
0%
771 µs
772.4 µs
test_with_query_none
tests/test_url_benchmarks.py::test_with_query_none
CodSpeed Performance Gauge
0%
149 µs
149.3 µs
test_url_join
tests/test_url_benchmarks.py::test_url_join
CodSpeed Performance Gauge
0%
468.4 µs
469.4 µs
test_url_build_with_host_and_port
tests/test_url_benchmarks.py::test_url_build_with_host_and_port
CodSpeed Performance Gauge
0%
803.9 µs
806 µs
test_url_origin_with_user_pass
tests/test_url_benchmarks.py::test_url_origin_with_user_pass
CodSpeed Performance Gauge
0%
100.6 µs
100.9 µs
test_url_build_no_netloc
tests/test_url_benchmarks.py::test_url_build_no_netloc
CodSpeed Performance Gauge
0%
452.3 µs
453.4 µs
test_url_build_with_simple_query
tests/test_url_benchmarks.py::test_url_build_with_simple_query
CodSpeed Performance Gauge
0%
2.7 ms
2.7 ms
test_url_make_with_host_and_path
tests/test_url_benchmarks.py::test_url_make_with_host_and_path
CodSpeed Performance Gauge
0%
709.9 µs
712.1 µs
test_url_make_no_netloc
tests/test_url_benchmarks.py::test_url_make_no_netloc
CodSpeed Performance Gauge
0%
481.5 µs
483.2 µs
test_url_with_path_to_string
tests/test_url_benchmarks.py::test_url_with_path_to_string
CodSpeed Performance Gauge
0%
312.7 µs
314 µs
test_url_build_no_netloc_relative
tests/test_url_benchmarks.py::test_url_build_no_netloc_relative
CodSpeed Performance Gauge
0%
444.3 µs
446.2 µs
test_url_joinpath_with_truediv
tests/test_url_benchmarks.py::test_url_joinpath_with_truediv
CodSpeed Performance Gauge
0%
1 ms
1 ms
test_url_build_access_raw_host
tests/test_url_benchmarks.py::test_url_build_access_raw_host
CodSpeed Performance Gauge
-1%
854.6 µs
859.6 µs
test_url_build_with_host_path_and_port
tests/test_url_benchmarks.py::test_url_build_with_host_path_and_port
CodSpeed Performance Gauge
-1%
716.2 µs
720.4 µs
test_with_query_sequence_mapping
tests/test_url_benchmarks.py::test_with_query_sequence_mapping
CodSpeed Performance Gauge
-1%
3.2 ms
3.2 ms
test_url_with_path_origin
tests/test_url_benchmarks.py::test_url_with_path_origin
CodSpeed Performance Gauge
-1%
99.4 µs
100.3 µs
test_empty_query_string
tests/test_url_benchmarks.py::test_empty_query_string
CodSpeed Performance Gauge
-2%
59.8 µs
60.8 µs
test_human_repr
tests/test_url_benchmarks.py::test_human_repr
CodSpeed Performance Gauge
-2%
10.7 ms
11 ms
test_update_query_empty
tests/test_url_benchmarks.py::test_update_query_empty
CodSpeed Performance Gauge
-4%
426.7 µs
443.8 µs

Commits

Click on a commit to change the comparison range
Base
master
6601ba5
+116%
changelog
b7ca114
2 months ago
by bdraco
Home Terms PrivacyDocs