hex.ptr_flip_dbit¶
The stl.comp_flip_if executes in ~##w, which should be much less than @/2 operations.
like: (*ptr)+dbit;
Flip the address dbit-ahead of what the pointer points to.
ptr is a hex[:w/4] that holds an address, which we assume is dw-aligned.
Signature¶
def ptr_flip_dbit ptr < .pointers.to_flip { ... }
Defined in hex/pointers/xor_to_pointer.fj — lines 25–29 (view on GitHub).
Complexity¶
Time:
w(0.5@+2) + @+6Space:
w(0.5@+14) + @+6
See the complexity glossary for what @, w, dw, dbit, n mean.