Re: Introducing "Array Of" RFC

From: Date: Mon, 20 Jan 2014 04:19:51 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 1/19/14, 9:13 AM, Philip Sturgeon wrote:
> I think its a nice logical improvement which syntactically offers a
> replacement for looney boilerplate code, exactly like Variadics which
> a LOT of people are excited about.

Actually variadics solves a problem that can't be solved other ways,
namely by-ref for an unknown number of arguments. There is no userspace
boilerplate code, looney or otherwise, that can do that.

I won't argue whether the base need is great enough here. I am sure it
is to some people. I do have an issue with the idea that the right
solution is a full hash table scan on every function call. I have a
feeling that if this makes it in this is one of those features that will
be high my list for optimization/refactoring when I run across it in
code. As in, replace the per-call hash scan with a single userspace scan
that is only done once earlier in the stack. From a performance
perspective the only-done-once userspace version is extremely likely to
outperform this built-in per-call check assuming more than a trivial
amount of calls to the function in question.

-Rasmus



Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc

Thread (73 messages)

« previous php.internals (#71292) next »