develooper Front page | perl.perl5.porters | Postings from September 2014

[perl #122861] [PATCH] for storage of NVs, use "IV in sv_u in head no-body trick" where possible

Thread Previous
From:
Father Chrysostomos via RT
Date:
September 28, 2014 13:58
Subject:
[perl #122861] [PATCH] for storage of NVs, use "IV in sv_u in head no-body trick" where possible
Message ID:
rt-4.0.18-25577-1411912687-1714.122861-15-0@perl.org
On Sun Sep 28 05:39:18 2014, smueller@cpan.org wrote:
> On 09/28/2014 07:50 AM, bulk88 (via RT) wrote:
> > # New Ticket Created by  bulk88
> > # Please include the string:  [perl #122861]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=122861 >
> 
> > See attached patch. I am surprised Nicholas didn't do this in the
> > original "IV is now bodyless" patch, and nobody else thought of it for 9
> > years. I had heap corruption (a bodyless NV had free() called on it) and
> > in DEBUGGING failed an existing assert on 1st try of this patch but it
> > was fixed.
> 
> Around that time, Nicholas and I spoke about squeezing NVs into the SV 
> HEAD. But IIRC the reason not to do it was because on some systems
> sizeof(NV) > sizeof(IV)

Maybe even most systems at the time.  But the trend is changing, with everybody going 64-bit.

> and the special casing of some systems wasn't 
> deemed worth the small gain (NVs aren't that common in most Perl code).

Do you think it’s worth it now?  (I think it is.)

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=122861

Thread Previous


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