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

New RE_PROBE_IPV6_ONLY with better complexity in worst case #609

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

AlekseyLobanov
Copy link

I found that RE_PROBE_IPV6_ONLY may have awful complexity (exponential) on some cases like ':'*100.

Fix included, tests are green.

@AlekseyLobanov
Copy link
Author

Also three Regular Expressions may have cubic (N^3) complexity on some examples and I unable to perform quick fix.
What do you think about using RE2 library? It is still really fast but also will be fast on this examples.

@AlekseyLobanov
Copy link
Author

As a POC I tried

traceroute6 to turner-tls.map.fastly.net (2a04:4e42:200::323) from 2600:1700:bab0:d40:985:f00a:98bd:f142, 5 hops max, 12 byte packets
 1  * * *
 2  :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::  27.635 ms  20.383 ms  23.438 ms
 3  * * *
 4  2001:1890:ff:ff08:12:242:117:16  20.118 ms  20.327 ms  21.213 ms
 5  * * *

at the web demo

@kellyjonbrazil kellyjonbrazil changed the base branch from master to dev November 5, 2024 15:03
@kellyjonbrazil
Copy link
Owner

Thanks for this fix! I don't want to introduce any new dependencies, so we'll have to pass on RE2.

@kellyjonbrazil kellyjonbrazil merged commit 0af4a3a into kellyjonbrazil:dev Nov 19, 2024
21 checks passed
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.

2 participants