--- a/ByteArray.st Wed Oct 10 18:50:24 2012 +0200
+++ b/ByteArray.st Wed Oct 10 19:00:30 2012 +0200
@@ -2945,6 +2945,16 @@
len -= nInst;
}
cp += index - 1;
+#ifdef __UNROLL_LOOPS__
+ while ((index+4) < len) {
+ if (cp[0] == byteValue) { RETURN ( __mkSmallInteger(index) ); }
+ if (cp[1] == byteValue) { RETURN ( __mkSmallInteger(index+1) ); }
+ if (cp[2] == byteValue) { RETURN ( __mkSmallInteger(index+2) ); }
+ if (cp[3] == byteValue) { RETURN ( __mkSmallInteger(index+3) ); }
+ index += 4;
+ cp += 4;
+ }
+#endif
while (index <= len) {
if (*cp == byteValue) {
RETURN ( __mkSmallInteger(index) );
@@ -2990,9 +3000,9 @@
!ByteArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.207 2012-05-14 11:16:10 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.208 2012-10-10 17:00:30 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.207 2012-05-14 11:16:10 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.208 2012-10-10 17:00:30 cg Exp $'
! !