Attached is the updated code. (I dropped an instance on itself to just show the icon I made symbolizing what it is doing.)
One more thing that you probably already found - you have a small bug in this code, the input to one of the comparisons (I didn't check the code enough to determine if it's the less than or the greater than) should come from the other shift register value.
Ouch. Thanks. I missed that. Must have touched off on the wrong wire when completing it.
Here is the update version, but the 2nd copy I made using build array method.
Early test results are showing similar times, but I'm rechecking before I post any results.
Have you tried getting rid of the cases structures? Maybe marginally faster, something like below. (Sorry I could not use your code, as it was not importing correctly to LabVIEW).
EDIT: The snippet below reduces to 1 add, instead of 2