Re: type string (huh?)
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Mar 18, 1999
- 480 views
> I had reached some of Rod Jackson's conclusions at the time I received his > post -- the fact that it takes *really* long sequences (like those in your > test program) for string13 to come out on top. I also figured out another > reason why your benchmark program favored string13. You have the > non-integer, non-byte values situated near the ends of those loooooong > sequence values. If you put those non-byte values at the very beginning, > string12 comes out *much* faster, since it can exit immediately when it hits > the first non-byte value, while string13 has to and_bits() the whole shebang > first. Am I missing something here, but shouldnt any type check routine be primarly optimized for legal values ? Illegal value will half of the time halt the program anyway. So, his string routine *is* the fastest. No matter how quick other routines spot the illegal one. 99% of the processing and the final working program will use legal string values anyways. Ralf