mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
20fe70e321
This PR adds interning of strings representing common integer values, which greatly speeds up "to string" operations on numbers, and updates some built-ins commonly used for this to make use of interned values where possible. This is "light" version of a previous PR that did this more aggressively, but also came with more caveats. Importantly, interning of new strings is now never done at "runtime", but only allowed at init time. The API for interning is marked experimental and should not relied upon by anyone who expects a stable API. Signed-off-by: Anders Eknert <anders@styra.com>