Shortcut rangechecking for small values #1428
matthiasgoergens
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the moment every value we rangecheck from eg the CPU table goes through a two step process:
That's a total of five lookups, and 4 extra values we need to commit to.
For small values, we can shortcut that process: directly look up from the CPU table into the u8 rangecheck table.
As far as the CPU is concerned, any value to be rangechecked would be non-deterministically looked up in one of the rangecheck tables.
We would need to rangecheck to see whether this buys us anything, because the ability to do multiplicities in the u32 rangecheck table might already gives us most of the benefit.
Beta Was this translation helpful? Give feedback.
All reactions