Most SV structures are greater than 12 bytes, and I could reduce the overhead commensurately if (for example) there was only ever one SvNULL allocated in the system and all other SV's were multiples of 16 or 20 bytes?
But more than one SvNULL will be created, as the following shows:
$ perl -MDevel::Peek -we '$a = undef; $b = undef; Dump($a); Dump($b)'
SV = NULL(0x0) at 0x8191dc4
REFCNT = 1
FLAGS = ()
SV = NULL(0x0) at 0x8191ddc
REFCNT = 1
FLAGS = ()
And note that their addresses are 24 bytes apart, which doesn't suggest any alignment on 16 or 20 byte intervals. This:
$ perl -MDevel::Peek -we '$a = 1; $b = 2; Dump ($a); Dump ($b)'
SV = IV(0x8192edc) at 0x8191dbc
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 1
SV = IV(0x8192ee4) at 0x8191de0
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 2
creates two SVs 36 bytes apart, which suggest you can't use anything larger than 12.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.