From d34224444e049161c83557e72e88943bd732d89d Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 2 Oct 2020 17:34:14 +1000 Subject: Use builtin eq var in rate and stmutil In particular, in the rate limiter this gives a massive performance increase. --- stmutil/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stmutil/context.go') diff --git a/stmutil/context.go b/stmutil/context.go index 315abf4..8a4d58d 100644 --- a/stmutil/context.go +++ b/stmutil/context.go @@ -23,7 +23,7 @@ func ContextDoneVar(ctx context.Context) (*stm.Var, func()) { if ctx.Err() != nil { // TODO: What if we had read-only Vars? Then we could have a global one for this that we // just reuse. - v := stm.NewVar(true) + v := stm.NewBuiltinEqVar(true) return v, func() {} } v := stm.NewVar(false) -- cgit v1.2.3