develooper Front page | perl.perl5.porters | Postings from March 2017

Re: [External] Re: proof-of-concept short-string PVs

Thread Previous
From:
Eric Herman via perl5-porters
Date:
March 31, 2017 08:24
Subject:
Re: [External] Re: proof-of-concept short-string PVs
Message ID:
cdaa7dff-c376-1462-75e0-07679155f971@booking.com
First, I wish to express that the short-string PVs is a very interesting 
PoC!

Also, the discussion around the PoC makes me want to skip work and hack 
on this stuff instead. :)

On 30-03-17 18:07, bulk88 wrote:

> I once made a branch that eliminated SVt_NULL and #define-ed it
> to SVt_IV (both are bodyless, only difference is sv_any points to svu in
> a SVt_IV while sv_any is NULL on a SVt_NULL, why not always keep a new
> undef SV as an IV type unless otherwise upgraded, its just one CPU
> subtraction op and 1 write op at SV head alloc time).

While I really like this line of thought as well, I am concerned about 
how much code does something like:

if (type == SVt_NULL) { ... }

or:

switch (SvTYPE(sv)) { case SVt_NULL: .... }


Perhaps some macro wizardry could help, but I think this kind of change 
would be very hard to do without causing a lot of pain.

-- 
Eric Herman - mobile: +31 620719662
Booking.com - Principal developer - C⚙re infra: DB Scaling

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