Closed AlekseyLobanov closed 3 days ago
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.
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
Thanks for this fix! I don't want to introduce any new dependencies, so we'll have to pass on RE2.
I found that
RE_PROBE_IPV6_ONLY
may have awful complexity (exponential) on some cases like':'*100
.Fix included, tests are green.