There still is a possibility to speedup Scrypt on GPU (as used in Litecoin and implemented in cgminer, there are too many scrypts today

) - something like 20%, may be 50% with some luck. No one noticed misplaced 'if' operator

Just want to pop this sentence up.
Was this ironic or do you have the holy grail of scrypt?

Misplaced 'if' in lookup gap mode

Not exactly sure how much it could be optimized
#if (LOOKUP_GAP == 1)
#elif (LOOKUP_GAP == 2)
if (j&1) salsa(V);
#else
uint val = j%LOOKUP_GAP;
for (uint z=0; z salsa(V);
#endif
#pragma unroll
for(uint z=0; z X[z] ^= V[z];
salsa(X);