hex.cmp (arity 6)ΒΆ

Three-way compare on n-nibble hex vectors: jumps to lt if a[:n]<b[:n], eq if equal, gt if a[:n]>b[:n].

SignatureΒΆ

def cmp n, a, b, lt, eq, gt { ... }

Defined in hex/cond_jumps.fj β€” lines 120–123 (view on GitHub).

ComplexityΒΆ

  • Time: m(3@+8)        // m=(n-i), where i is the most-significant index such that a[i] != b[i] (if a==b, then m==n).

  • Space: n(3@+30)

See the complexity glossary for what @, w, dw, dbit, n mean.

Requires initΒΆ

The following must be initialised before this macro is invoked:

  • hex.cmp.init (or hex.init)

SourceΒΆ

Depends onΒΆ

Used byΒΆ

Example usesΒΆ


← Previous: hex.cmp/5 Next: hex.cmp.cmp_eq_next β†’