Unless your XS version is quicker than my Inline C algorithm:
__DATA__ __C__ int uniq( char* s ) { int i; int t = 0; for( i=0; i<10; i++ ) { t |= 1 << ( s[i] - 48 ); } return t == 1023; }
which doesn't seem likely, then the big hash lookup will still be faster,
In reply to Re^2: Determining uniqueness in a string.
by BrowserUk
in thread Determining uniqueness in a string.
by Yzzyx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |