develooper Front page | perl.perl5.porters | Postings from December 2000

Re: strtoul (was Re: [PATCH] Fcntl constants speedup)

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
December 19, 2000 07:50
Subject:
Re: strtoul (was Re: [PATCH] Fcntl constants speedup)
Message ID:
20001219094627.C28837@chaos.wustl.edu
On Tue, Dec 19, 2000 at 09:20:04AM +0000, Nick Ing-Simmons wrote:
> Nicholas Clark <nick@ccl4.org> writes:
> >
> >So it looks like we might get a speed kick from doing strtoul ourselves in
> >sv.c (as part of looks_like_number) hardwired for base 10.
> 
> Sounds good - I was always slightly surprised it did not do it anyway.
> 
> >As long as we don't mind losing locale based number grouping (whatever
> >that is, but it's compiled in in my copy of strtol - I disassembled it
> >and can see the pattern of code that's doing it)
> 
> We only loose "locale based number grouping" for things that "look
> like numbers" in perl's view - so do we really loose anything?

We gain more warnings if the system's strtoul() didn't use to complain
about things like "1,234,567" and nicely returned 1234567.  Search
perllocale for 'grouping', and see localeconv(3).

> -- 
> Nick Ing-Simmons <nik@tiuk.ti.com>
> Via, but not speaking for: Texas Instruments Ltd.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About