-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I'm happy to submit a PR if you want me to, but given that I don't know you motivation then I'm not sure which way you want to go (or to stick with the status quo)... But...
So you have kind of gone with a halfway house where you have the runtime inline calls to smaller Sort/Merge stuff (fair enough), but then you have not created a function for the other guff. So I would suggest either create a function for them (preferable I believe) or just using the script to fully expand the code (which, although verbose and repetitive, does give a better understanding of what's going on under the hood in the runtime).
Anyway, what guff an I talking about?
The stuff like:
tmp = Shuffle(d02, X_R);
tmp = Permute4x64(tmp.AsInt64(), P_X).AsInt32();
d02 = Max(d01, tmp);
d01 = Min(d01, tmp);
Which could just be a function (it's currently repeated ~ 50 times), and
tmp = d01;
d01 = Min(d02, d01);
d02 = Max(d02, tmp);
This should change neither functionality, not performance...
But if you're happy with the status quo then I'm not going to argue... Otherwise just let me know and I'll submit a PR.