develooper Front page | perl.perl5.porters | Postings from July 2019

Re: [perl #134172] commit 027471cf breaks t/op/sprintf2.t onFreeBSD-11

Thread Previous | Thread Next
From:
Tony Cook
Date:
July 25, 2019 00:38
Subject:
Re: [perl #134172] commit 027471cf breaks t/op/sprintf2.t onFreeBSD-11
Message ID:
20190725003746.svzoahoqgkbgeuib@mars.tony.develop-help.com
On Wed, Jul 24, 2019 at 03:07:48PM -0700, Hugo van der Sanden via RT wrote:
> On Wed, 24 Jul 2019 14:18:01 -0700, jkeenan wrote:
> > On Mon, 22 Jul 2019 20:06:30 GMT, jkeenan wrote:
> > > Applying to branch for smoke testing.
> > 
> > Smoke-test results in the branch appear satisfactory.
> > 
> > http://perl.develop-help.com/?b=smoke-me%2Fjkeenan%2Fhv%2F134172-
> > sprintf
> > 
> > What else do we have to decide before merging this branch and closing
> > this ticket?
> 
> I'd like to get some feedback, particularly from Karl and Dave; Karl has already indicated he'll try to take a look this weekend. It also looks like Tony has been looking into the same issue, I just noticed he has created a branch tonyc/134172-in-lc which may have duplicated some of the work.
> 
> Given clean smokes, I'm already pretty comfortable with the first patch; the second patch ("Avoid multiple checks of IN_LC(LC_NUMERIC)") probably needs better documentation, possibly better naming, and due consideration whether to expose the new macros as part of the API.
> 
> Hugo

It looks reasonable to me.

One thing I noticed in the original code was that
STORE_LC_NUMERIC_SET_TO_NEEDED() could call the possibly expensive
IN_LC(LC_NUMERIC) up to three times:

+                    (   (  in_lc_numeric && _NOT_IN_NUMERIC_UNDERLYING)     \
+                     || (! in_lc_numeric && _NOT_IN_NUMERIC_STANDARD)));    \
+            if (in_lc_numeric) {                                            \

(for a bare STORE_LC_NUMERIC_SET_TO_NEEDED() in_lc_numeric is
IN_LC(LC_NUMERIC) )

Tony

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