Skip to content

perf: pre-compile regex in RegexMatch for better performance#1721

Open
Herrtian wants to merge 1 commit intoapache:masterfrom
Herrtian:perf/precompile-regex-in-regexmatch
Open

perf: pre-compile regex in RegexMatch for better performance#1721
Herrtian wants to merge 1 commit intoapache:masterfrom
Herrtian:perf/precompile-regex-in-regexmatch

Conversation

@Herrtian
Copy link
Copy Markdown

Summary

Ref #1690

RegexMatch() used regexp.MatchString() which recompiles the regex pattern on every single invocation. This is a performance bottleneck since RegexMatch is called by KeyMatch2, KeyMatch3, KeyMatch5, and can be used directly in policy matchers.

Change

Replaced regexp.MatchString() with the existing mustCompileOrGet() cache that is already used throughout the codebase for other KeyMatch functions. The compiled regex is cached in a thread-safe map and reused on subsequent calls.

// Before: recompiles regex on every call
func RegexMatch(key1 string, key2 string) bool {
    res, err := regexp.MatchString(key2, key1)
    if err != nil {
        panic(err)
    }
    return res
}

// After: uses cached compiled regex
func RegexMatch(key1 string, key2 string) bool {
    return mustCompileOrGet(key2).MatchString(key1)
}

Test plan

  • go build ./... passes
  • go test ./... — all tests pass
  • go test ./util/... — all util tests pass including regex match tests

🤖 Generated with Claude Code

RegexMatch() called regexp.MatchString() which recompiles the pattern on
every invocation. Use the existing mustCompileOrGet() cache instead.

Ref apache#1690
@Herrtian Herrtian force-pushed the perf/precompile-regex-in-regexmatch branch from 4f91d7c to f4fa290 Compare April 15, 2026 17:54
@github-actions
Copy link
Copy Markdown

Benchmark Comparison

Comparing base branch (017ae0e)
vs PR branch (f4fa290)

goos: linux
goarch: amd64
pkg: github.com/casbin/casbin/v3
cpu: AMD EPYC 9V74 80-Core Processor                
                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │     sec/op     │    sec/op     vs base                      Diff          │
CachedRaw                                          18.11n ± ∞ ¹   18.15n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.22% ➡️
CachedBasicModel                                   142.6n ± ∞ ¹   147.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         +3.30% ➡️
CachedRBACModel                                    143.2n ± ∞ ¹   145.8n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.82% ➡️
CachedRBACModelSmall                               146.6n ± ∞ ¹   149.5n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.98% ➡️
CachedRBACModelMedium                              156.4n ± ∞ ¹   158.4n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.28% ➡️
CachedRBACModelLarge                               143.3n ± ∞ ¹   145.9n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.81% ➡️
CachedRBACModelWithResourceRoles                   144.1n ± ∞ ¹   145.2n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.76% ➡️
CachedRBACModelWithDomains                         152.4n ± ∞ ¹   155.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.90% ➡️
CachedABACModel                                    2.475µ ± ∞ ¹   2.479µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.16% ➡️
CachedKeyMatchModel                                157.2n ± ∞ ¹   159.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.34% ➡️
CachedRBACModelWithDeny                            142.8n ± ∞ ¹   145.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.75% ➡️
CachedPriorityModel                                143.6n ± ∞ ¹   145.2n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.11% ➡️
CachedWithEnforceContext                           204.5n ± ∞ ¹   209.0n ± ∞ ¹       ~ (p=1.000 n=1) ²         +2.20% ➡️
CachedRBACModelMediumParallel                      154.3n ± ∞ ¹   155.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.65% ➡️
HasPolicySmall                                     372.8n ± ∞ ¹   383.9n ± ∞ ¹       ~ (p=1.000 n=1) ²         +2.98% ➡️
HasPolicyMedium                                    380.3n ± ∞ ¹   375.7n ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.21% ➡️
HasPolicyLarge                                     402.0n ± ∞ ¹   425.6n ± ∞ ¹       ~ (p=1.000 n=1) ²         +5.87% ➡️
AddPolicySmall                                     439.0n ± ∞ ¹   444.4n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.23% ➡️
AddPolicyMedium                                    612.1n ± ∞ ¹   545.7n ± ∞ ¹       ~ (p=1.000 n=1) ²         -10.85% 🚀
AddPolicyLarge                                     1.096µ ± ∞ ¹   1.062µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -3.10% ➡️
RemovePolicySmall                                  427.5n ± ∞ ¹   428.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.19% ➡️
RemovePolicyMedium                                 450.5n ± ∞ ¹   453.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.62% ➡️
RemovePolicyLarge                                  500.4n ± ∞ ¹   501.2n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.16% ➡️
Raw                                                18.24n ± ∞ ¹   18.13n ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.60% ➡️
BasicModel                                         3.289µ ± ∞ ¹   3.256µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.00% ➡️
RBACModel                                          4.865µ ± ∞ ¹   4.867µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.04% ➡️
RBACModelSizes/small                               44.15µ ± ∞ ¹   44.13µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.05% ➡️
RBACModelSizes/medium                              445.4µ ± ∞ ¹   431.2µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -3.19% ➡️
RBACModelSizes/large                               5.296m ± ∞ ¹   5.141m ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.93% ➡️
RBACModelSmall                                     51.28µ ± ∞ ¹   51.35µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.14% ➡️
RBACModelMedium                                    500.8µ ± ∞ ¹   493.2µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.52% ➡️
RBACModelLarge                                     5.345m ± ∞ ¹   5.340m ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.09% ➡️
RBACModelWithResourceRoles                         3.976µ ± ∞ ¹   3.997µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.53% ➡️
RBACModelWithDomains                               4.653µ ± ∞ ¹   4.622µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.67% ➡️
ABACModel                                          2.392µ ± ∞ ¹   2.405µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.54% ➡️
ABACRuleModel                                      3.861m ± ∞ ¹   3.894m ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.85% ➡️
KeyMatchModel                                      5.361µ ± ∞ ¹   4.012µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -25.16% 🚀
RBACModelWithDeny                                  6.159µ ± ∞ ¹   6.193µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.55% ➡️
PriorityModel                                      3.758µ ± ∞ ¹   3.818µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.60% ➡️
RBACModelWithDomainPatternLarge                   11.627µ ± ∞ ¹   7.202µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -38.06% 🚀
RoleManagerSmall                                   41.97µ ± ∞ ¹   42.53µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.33% ➡️
RoleManagerMedium                                  449.6µ ± ∞ ¹   450.7µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.24% ➡️
RoleManagerLarge                                   5.532m ± ∞ ¹   5.424m ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.95% ➡️
BuildRoleLinksWithPatternLarge                     249.7m ± ∞ ¹   251.9m ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.88% ➡️
BuildRoleLinksWithDomainPatternLarge               7.954m ± ∞ ¹   8.153m ± ∞ ¹       ~ (p=1.000 n=1) ²         +2.50% ➡️
BuildRoleLinksWithPatternAndDomainPatternLarge     254.6m ± ∞ ¹   254.9m ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.12% ➡️
HasLinkWithPatternLarge                            820.5n ± ∞ ¹   823.2n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.33% ➡️
HasLinkWithDomainPatternLarge                      324.4n ± ∞ ¹   322.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.65% ➡️
HasLinkWithPatternAndDomainPatternLarge            809.6n ± ∞ ¹   826.6n ± ∞ ¹       ~ (p=1.000 n=1) ²         +2.10% ➡️
ConcurrentHasLinkWithMatching                      1.076µ ± ∞ ¹   1.093µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.58% ➡️
geomean                                              4.393µ         4.339µ                                     -1.23% ➡️
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                                                 │ base-bench.txt │             pr-bench.txt              │
                                                 │      B/op      │     B/op       vs base                     Diff          │
CachedRaw                                           0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedBasicModel                                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModel                                     104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelSmall                                104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelMedium                               104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelLarge                                96.00 ± ∞ ¹     96.00 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelWithResourceRoles                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelWithDomains                          120.0 ± ∞ ¹     120.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedABACModel                                   1.495Ki ± ∞ ¹   1.497Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.13% ➡️
CachedKeyMatchModel                                 152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelWithDeny                             104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedPriorityModel                                 104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedWithEnforceContext                            176.0 ± ∞ ¹     176.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelMediumParallel                       104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasPolicySmall                                      102.0 ± ∞ ¹     102.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasPolicyMedium                                     109.0 ± ∞ ¹     109.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasPolicyLarge                                      117.0 ± ∞ ¹     117.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
AddPolicySmall                                      152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
AddPolicyMedium                                     165.0 ± ∞ ¹     165.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
AddPolicyLarge                                      421.0 ± ∞ ¹     418.0 ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.71% ➡️
RemovePolicySmall                                   166.0 ± ∞ ¹     166.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
RemovePolicyMedium                                  173.0 ± ∞ ¹     173.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
RemovePolicyLarge                                   181.0 ± ∞ ¹     181.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
Raw                                                 0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
BasicModel                                        1.471Ki ± ∞ ¹   1.472Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.07% ➡️
RBACModel                                         2.006Ki ± ∞ ¹   2.010Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.20% ➡️
RBACModelSizes/small                              19.68Ki ± ∞ ¹   19.70Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.10% ➡️
RBACModelSizes/medium                             186.9Ki ± ∞ ¹   187.0Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.05% ➡️
RBACModelSizes/large                              1.813Mi ± ∞ ¹   1.814Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.06% ➡️
RBACModelSmall                                    19.68Ki ± ∞ ¹   19.70Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.10% ➡️
RBACModelMedium                                   189.7Ki ± ∞ ¹   189.7Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.00% ➡️
RBACModelLarge                                    1.840Mi ± ∞ ¹   1.840Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.00% ➡️
RBACModelWithResourceRoles                        1.785Ki ± ∞ ¹   1.788Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.17% ➡️
RBACModelWithDomains                              1.776Ki ± ∞ ¹   1.778Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.11% ➡️
ABACModel                                         1.487Ki ± ∞ ¹   1.489Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.13% ➡️
ABACRuleModel                                     1.173Mi ± ∞ ¹   1.174Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.09% ➡️
KeyMatchModel                                     2.974Ki ± ∞ ¹   1.644Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -44.72% 🚀
RBACModelWithDeny                                 2.408Ki ± ∞ ¹   2.410Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.08% ➡️
PriorityModel                                     1.715Ki ± ∞ ¹   1.717Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.12% ➡️
RBACModelWithDomainPatternLarge                   8.652Ki ± ∞ ¹   4.362Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -49.58% 🚀
RoleManagerSmall                                    800.0 ± ∞ ¹     800.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
RoleManagerMedium                                 13.63Ki ± ∞ ¹   13.63Ki ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
RoleManagerLarge                                  224.6Ki ± ∞ ¹   224.6Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.00% ➡️
BuildRoleLinksWithPatternLarge                    60.66Mi ± ∞ ¹   60.67Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.02% ➡️
BuildRoleLinksWithDomainPatternLarge              3.935Mi ± ∞ ¹   3.939Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.10% ➡️
BuildRoleLinksWithPatternAndDomainPatternLarge    62.28Mi ± ∞ ¹   62.26Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.03% ➡️
HasLinkWithPatternLarge                             112.0 ± ∞ ¹     112.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasLinkWithDomainPatternLarge                       16.00 ± ∞ ¹     16.00 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasLinkWithPatternAndDomainPatternLarge             112.0 ± ∞ ¹     112.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
ConcurrentHasLinkWithMatching                       736.0 ± ∞ ¹     736.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
geomean                                                         ⁴                                              -2.51% ➡️               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │   allocs/op    │  allocs/op    vs base                      Diff          │
CachedRaw                                           0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedBasicModel                                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModel                                     4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelSmall                                4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelMedium                               4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelLarge                                3.000 ± ∞ ¹    3.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelWithResourceRoles                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelWithDomains                          4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedABACModel                                     18.00 ± ∞ ¹    18.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedKeyMatchModel                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelWithDeny                             4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedPriorityModel                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedWithEnforceContext                            4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelMediumParallel                       4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasPolicySmall                                      4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasPolicyMedium                                     4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasPolicyLarge                                      5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
AddPolicySmall                                      6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
AddPolicyMedium                                     7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
AddPolicyLarge                                      9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RemovePolicySmall                                   7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RemovePolicyMedium                                  7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RemovePolicyLarge                                   8.000 ± ∞ ¹    8.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
Raw                                                 0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
BasicModel                                          18.00 ± ∞ ¹    18.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModel                                           36.00 ± ∞ ¹    36.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelSizes/small                                481.0 ± ∞ ¹    481.0 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelSizes/medium                              4.829k ± ∞ ¹   4.829k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelSizes/large                               48.23k ± ∞ ¹   48.23k ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
RBACModelSmall                                      616.0 ± ∞ ¹    616.0 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelMedium                                    6.016k ± ∞ ¹   6.016k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelLarge                                     60.07k ± ∞ ¹   60.07k ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
RBACModelWithResourceRoles                          28.00 ± ∞ ¹    28.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelWithDomains                                26.00 ± ∞ ¹    26.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
ABACModel                                           17.00 ± ∞ ¹    17.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
ABACRuleModel                                      34.08k ± ∞ ¹   34.08k ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
KeyMatchModel                                       38.00 ± ∞ ¹    22.00 ± ∞ ¹       ~ (p=1.000 n=1) ³         -42.11% 🚀
RBACModelWithDeny                                   50.00 ± ∞ ¹    50.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
PriorityModel                                       23.00 ± ∞ ¹    23.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelWithDomainPatternLarge                     73.00 ± ∞ ¹    39.00 ± ∞ ¹       ~ (p=1.000 n=1) ³         -46.58% 🚀
RoleManagerSmall                                    100.0 ± ∞ ¹    100.0 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RoleManagerMedium                                  1.744k ± ∞ ¹   1.744k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RoleManagerLarge                                   19.74k ± ∞ ¹   19.74k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
BuildRoleLinksWithPatternLarge                     3.560M ± ∞ ¹   3.560M ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
BuildRoleLinksWithDomainPatternLarge               120.2k ± ∞ ¹   120.2k ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
BuildRoleLinksWithPatternAndDomainPatternLarge     3.637M ± ∞ ¹   3.637M ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
HasLinkWithPatternLarge                             9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasLinkWithDomainPatternLarge                       1.000 ± ∞ ¹    1.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasLinkWithPatternAndDomainPatternLarge             9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
ConcurrentHasLinkWithMatching                       11.00 ± ∞ ¹    11.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
geomean                                                         ⁴                                              -2.32% ➡️               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

🤖 This comment will be automatically updated with the latest benchmark results.

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.

1 participant