]> Cypherpunks.ru repositories - gostls13.git/commit
net/http: add a benchmark for multi indexing
authorJonathan Amsterdam <jba@google.com>
Tue, 19 Sep 2023 21:23:58 +0000 (17:23 -0400)
committerJonathan Amsterdam <jba@google.com>
Tue, 19 Sep 2023 22:53:47 +0000 (22:53 +0000)
commit3857a89e7eb872fa22d569e70b7e076bec74ebbb
treec22ecfb429597325b022e825bdd94b46e6ad29b1
parent4d700a719bacb4286032c66e4e68d74024f8e748
net/http: add a benchmark for multi indexing

We don't index multis, so a corpus full of them will take quadratic
time to check for conflicts. How slow is that going to be in practice?

This benchmark indexes and checks a thousand multi patterns, all disjoint.
It runs in about 35ms.

Change-Id: Id27940ab19ad003627bd5c43c53466e01456b796
Reviewed-on: https://go-review.googlesource.com/c/go/+/529477
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/http/pattern_test.go
src/net/http/routing_index_test.go