Front page | perl.perl5.porters |
Postings from July 2010
Re: MG slabs?
Thread Previous
|
Thread Next
From:
Leon Timmermans
Date:
July 18, 2010 16:02
Subject:
Re: MG slabs?
Message ID:
AANLkTimn1MAv-rGMDlIcqVmL44LTGtEJA-YUTFvn91S_@mail.gmail.com
On Sun, Jul 18, 2010 at 11:47 PM, Dave Mitchell <davem@iabyn.com> wrote:
> Here's a bit of idle speculation:
>
> It's well known that linked lists are very bad for modern cachey CPUs:
> following through a linked list may involve a CPU stall with each
> foo = foo->next step.
>
> Now then, magic is currently attached to SVs using linked lists, and magic
> is attached to lots of SVs for lots of trivial reasons: taint, pos, etc.
> So a lot of processing of SVs involves lots of running through the MG
> linked list, eg
>
> $ grep mg_find *.c | wc -l
> 87
>
> Which may be slow (although I haven't instrumented this with cachegrind or
> anything yet).
>
> So... maybe SvMAGIC should point to a singe array (in the C sense, not the
> AV sense) of MG structures. If we need to add more magic, we realloc the
> array.
How often do SVs really have more than one kind of magic? How much can
that be reduced by making taint a flag instead of a kind of magic?
Would this really be worth the effort?
Leon
Thread Previous
|
Thread Next