Repository navigation
Commit f242c0f
kernel: skip ip_address for host names on the host:port path
_is_bare_ipv6 now returns early unless the text has at least two colons and no leading bracket. ip_address raised a ValueError for every host name and host:port string, which made the folding path about 2x slower than bc7c09e. A bare IPv6 literal always has two or more colons, so behavior is unchanged; the session tests and the realkernel loopback tests pass.
Microbenchmark, median us per call (20000 calls x 7 repeats):
- bare host, _port 8443: 1.305 base, 1.261 new
- host:port, _port 8443: 1.364 base, 1.393 new (+2%)
- IPv6 bracketed, _port 8443: 1.340 base, 1.355 new (+1%)
- IPv6 bare, _port 8443: 1.413 base, 2.642 new (+87%, the successful ip_address parse)
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>1 parent bdeef64 commit f242c0f
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
127 | | - | |
| 131 | + | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
| |||
0 commit comments