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

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

Thread Previous
Eric Herman via perl5-porters
March 31, 2017 08:24
Re: [External] Re: proof-of-concept short-string PVs
Message ID:
First, I wish to express that the short-string PVs is a very interesting 

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) { ... }


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 - Principal developer - C⚙re infra: DB Scaling

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About