Re: Streamtokenizer
OneGuy <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, May 9, 2008 at 5:51 AM, Andrew Haley <[email protected]> wrote: > Could be. That's one of the problems of microbenchmarks: they do > unrealistic things and tend to magnify the importance of a tiny part > of the code base. The famous Dhrystone benchmark was hyper-sensitive > to the performance of string copying. True. However, there is no reason to convert char array into a String and parse the String to number. The char array can be converted to a number token easily in a loop with something like number= number * 10 + (char - '0');