Complexity Changes by Version#
Every built-in function has a complexity cost, charged against a script’s per-transaction complexity limit. Several built-ins get cheaper (rarely, more expensive) at a later standard library version, independent of any change to their arguments or return type — a script recompiled at a higher STDLIB_VERSION can pass where it previously failed the complexity limit, with no code change.
Note
Verified against node-scala v1.7.0. Generated by docs/scripts/extract_ride_complexity.py in this repository, run against a checkout of node-scala’s lang module — see that script’s docstring for exactly what it does and does not capture. Re-run it after every node-scala release to catch drift; a diff means this table needs updating.
Where a function has more than one row, each row is a distinct overload (different argument types) with its own cost curve — the extraction can’t attach argument types to a row, only the version-to-cost map, so use the function reference to tell overloads apart by signature.
Function |
Complexity by version |
|---|---|
|
V5=8, V6=8, V7=8, V8=1 |
|
V4=30, V9=3 |
|
V1=1, V4=6, V9=2 |
|
V1=1, V4=20, V9=2 |
|
V6=6, V9=2 |
|
V6=20, V9=2 |
|
V9=2 |
|
V1=1, V5=14, V6=1 |
|
V5=128, V6=1 |
|
V1=2, V9=1 |
|
V5=192, V8=6 |
|
V5=160, V6=160, V7=160, V8=35 |
|
V5=192, V6=192, V7=192, V8=6 |
|
V5=65, V8=1 |
|
V5=65, V8=1 |
|
V3=100, V6=28 |
|
V5=200, V6=270 |
|
V4=7, V8=4, V9=1 |
|
V9=2 |
|
V8=4, V9=1 |
|
V9=2 |
|
V1=2, V9=1 |
|
V3=100, V4=75, V6=51 |
|
V1=1, V4=6, V9=2 |
|
V1=1, V4=20, V9=2 |
|
V6=6, V9=2 |
|
V6=20, V9=2 |
|
V5=65, V8=1 |
|
V5=65, V8=1 |
|
V5=65, V6=1 |
|
V3=10, V4=10, V5=10, V6=1 |
A missing version in a row means the cost from the previous listed version carries forward unchanged — e.g. removeByIndex stays at 4 for V8 until it drops to 1 at V9. median exists before V8: the List[Int] overload costs a flat 20 from V4 onward (so it has no row here), and the List[BigInt] overload costs 160 for V5–V7 and 35 from V8.
Coverage#
This table only includes functions whose cost is set directly with a string literal name — NativeFunction("name", Map(...), ...). Some costs are set through a helper (for example the BigInt arithmetic operators +, *, /, %, all V5 -> 8L/V5 -> 64L, stepping to 1L at V8, defined via a shared bigIntArithmeticOp helper) and aren’t captured here, since attributing them correctly would mean guessing at the helper’s argument order rather than reading it off a literal. Treat this page as a documented lower bound on what changed, not an exhaustive list — the Standard Library Versions page covers every genuinely new function and structure field, which this page does not repeat.