The machine compares two elements by placing them in the Glpyh of Unification and trying all six combinations of two other elements. If the elements are different, quintessence will form. These combinations are supplied by a single hexarm rotating nine times--two to reset, and one wasted turn because the elements cannot be lined up so neatly. The hexarm tries the elements, in pairs, in this order: EFAWEAFW. The "AF" combination is wasted, since it is already checked earlier with "FA". Perhaps using two hexarms would save the waste combination and allow resetting in 5 cycles instead of 6, saving 72 * (3+1) = 288 cycles.

I say 72 because the machine uses the naivest algorithm of comparing the match pattern to the sample at every index, requiring 4 x 3 x 6 = 72 comparisons, and comparison is a long operation. Given this massive multiplier, the steep discount on cost, and the total negligibility of area, I find that--and please listen carefully--speeding up comparison is the only part of this computation that actually matters.

That said, someone will surely implement the Knuth-Morris-Pratt algorithm to require only 54 comparisons, plus one to test whether the match pattern's first two atoms are identical, and that will be much better. I do not have it in me to do so.

There is some sleight of hand in the layout. Arm 2 never needs to stop spinning to be reloaded with salt, even if quintessence forms, because it is atop the salt input. This means I cannot use that input to make duplicates of the exoplanetary sample without slowing down the flywheel (the only thing that matters), so I calcify a copy of the match pattern and duplicate onto that. Arm 7 flicks widdershins and clockwise to reset the gold latch after each comparison, and it doesn't matter if the gold is outputted or not. There is no need to check for quintessence after every individual equality test, only once after every set of three--any rejected equality test rejects the entire match-pattern test at that index, so I can genuinely leave the quintessence on its glyph until it's time to perform the next match-pattern test. This frees up the busy schedule of Arm 6, which disposes of everything, and which also supplies a salt atom from the ashes of the exoplanetary sample to the logic of the final output.

I've learned from the best during my tenure at House van Bergen. May we all pursue our Opus Magnum.

- Alchemist Kazyan, /u/StillNotABrick