You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decide which keywords need processing once, rather than each validation.
On pathological examples (like the benchmark here) this avoids lots of
iterating over useless keywords.
In particular on aforementioned benchamrk, this takes us (on my laptop)
from:
beginning of schema: Mean +- std dev: 3.91 us +- 0.03 us
middle of schema: Mean +- std dev: 3.95 ms +- 0.04 ms
end of schema: Mean +- std dev: 4.03 ms +- 0.24 ms
valid: Mean +- std dev: 3.92 ms +- 0.05 ms
to:
beginning of schema: Mean +- std dev: 3.94 us +- 0.02 us
middle of schema: Mean +- std dev: 6.59 us +- 0.06 us
end of schema: Mean +- std dev: 7.31 us +- 0.06 us
valid: Mean +- std dev: 5.18 us +- 0.03 us
where clearly we now do essentially equivalent work no matter how many
useless keywords are interspersed in the schema.
0 commit comments