I have found some formulae to calculate/estimate the commuting probability $P_G$ of some finite non Abelian groups in this thesis. For example: $S_n$, $D_n$, $Q_8$ among others. The options from the list seem to be either of prime/odd order, or with $P_G \approx \frac{1}{4}$. That makes me wonder whether there is some power-of-two group that stands not far behind from the "anti-abelianess" of $S_n$. And, I am also asking my self whether $S_n$ stablishes some kind of lower limit for $P_G$, even considering groups with order different from powers of two.
An example of power-of-two group with $P_G \ll \frac{1}{4}$ is the multiplication over unitriangular matrices (modulo). However, it is still much higher than that of $S_n$ for similar set sizes. I tried also direct product of dihedral groups and achieved even higher $P_G$ than with the matrices.
I have been putting some code and results here, in the case someone is interested in further investigation; see sections Abstract algebra module, Commutativity degree of groups and Tendency of commutativity on Mn.
I am looking for a group that is algorithmically feasible to be implemented, like $S_n$, $D_n$, $Z_n$ etc. which are straight forward to code and fast to calculate.
UPDATE:
It seems that groups of order $2^n$ are fated to be almost Abelian because prime power order implies nilpotent.
UPDATE 2:
My best attempt was a direct product of $D_{34}$ and $Z_{2^{128}-159}$ (I doubled the order to avoid half bits when importing 128 bits from legacy systems, among other benefits [and disadvantages]). Unfortunately, another attempt was to use the matrices mentioned above in the place of S_{34}, but, in a small test with 45 bits the matrices already commuted with p = ~5e-06 after 40 million pairs. The direct product of dihedral groups give formula values worse than the matrices.
The usefulness of all this is to combine identifiers that can be nicely operated within certain guarantees/properties.
PS. Thanks to the help of a couple mathematicians, almost a year by now, I am almost not feeling in completely strange waters. I even learned what is a happy family - pun intended. [and monster group]
