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');
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.