bulat.ziganshin: > Hello Don, > > Saturday, December 15, 2007, 10:57:02 PM, you wrote: > > > Do you have the single loop C program, btw? I'd be curious to see if > > this is really "feasible". It would have to do the buffering, tokenising > > and accumulating in one go. I'd imagine it is a bit hairy. > > for (int n; n = read (0, buf, 32768);) { > for (char *p=buf,*end=buf+n;;) > while (*p++==' ') if(p==end) goto end; > while (*p++!=' ') if(p==end) goto end; > words++; > } > end:; > }
How many loops is that, Bulat? :) -- Don _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe