So I was working on a hex that required performing this stack manipulation: GFEDCBA -> FECBGAD
I wanted to test how much of a lag impact this has as testing that hex usually tanks the server's tps. (Maybe I should make a forum post for that thing...)
Modpack: https://modrinth.com/modpack/hexwoven
Setup:

For each test run, 8 iotas are added to the stack, then the spell imprinter loop runs the test every tick via the quad impetus setup. The spell imprinter contains a hex containing 128 copies of the test code in a row. That way, I can run the test code 128 times every tick.
Then, https://modrinth.com/mod/observable is used to profile the tps.
After waiting for the impeti to reach maximum speed, a 10 second profiler is run, then afterwards the average tick times used by all 4 impeti are added together.
Baseline Test
The spell imprinter has an empty list placed in it to test how quick the circle runs when it doesn't run anything.
- 149 us/t
- 134
- 143
The common choice for shuffling a bunch of iotas at once.
Code: Select all
Consideration
<901.00>
Swindler's Gambit
- 1513 us/t
- 1528
- 1656
- 1680
Replicating the above operation using simpler stack manipulation operations.
Code: Select all
Consideration
<6.00>
Fisherman's Gambit
Jester's Gambit
Consideration
<4.00>
Fisherman's Gambit
- 4167 us/t
- 3572
- 3718
- 3874
Fisherman's can be swapped to Geb's Gambit from Overevaluate.
Code: Select all
Geb's Gambit: 6
Jester's Gambit
Geb's Gambit: 4
- 3509 us/t
- 3386
- 3491
- 3444
Added by Overevaluate, a Jumble Iota reorders the stack when executed. As such, it should not be escaped.
Code: Select all
<7 [1 2 4 5 0 6 3]>
- 506 us/t
- 371
- 431
- 379
Jumble Iotas are the fastest, followed by Swindler's, then Geb, then Fisherman's
Experiment 2: Basic Stack Manipulation
These tests were actually my first time using Jumble Iotas, so I decided to perform some more tests.
Test 1: Jester's Gambit
The most basic operation in existence.
Code: Select all
Jester's Gambit
- 1620 us/t
- 1500
Jester's Gambit replicated by a jumble iota.
Code: Select all
<2 [1 0]>
- 451 us/t
- 385
Once again, Jumble Iotas were faster.
Experiment 3: Lightweight Instance Tests
After the above test, @Caelum suggested repeating the above experiment with less addons installed.
New addons list:
- Overevaluate
- Slate Works
- Any necessary dependencies

Baseline
- 242 us/t
- 199
- 188
- 570 us/t
- 540
- 543
- 484 us/t
- 389
- 400
After cutting out a bajillion addons, Jester's Gambit now takes significantly less time, while Jumble Iota still perform similarly.
Conclusions
I believe the main contributor to lag here isn't the operation itself, but rather the search through the pattern registry. The basic Jester's Gambit test gets faster when cutting out most addons so that there's less patterns in the registry.
Jumble Iota consistently perform in similar times regardless of the number of addons because they aren't a pattern. When executed, they immediately operate without needing to run a registry match.