Re: I wrote an extension: yajl-php
| From: | Johannes Schlüter | Date: | Wed, 09 Jan 2013 13:51:02 +0000 |
| Subject: | Re: I wrote an extension: yajl-php | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-10196@lists.php.net to get a copy of this message | ||
On Wed, 2013-01-09 at 16:23 +0500, Ruslan Osmanov wrote:
> On 01/09/2013 04:19 PM, Johannes Schlüter wrote:
> > * You are using resources, that is fine while we tend to use
> > objects instead.
> That's interesting. Is it better to use class objects instead of
> resources? I'm implementing event extension wrapping libevent. It will
> export around 7 resource types.
For a large part it is an API choice, many people write object-oriented
code and like that ;-)
> Should I rather make classes? I also guess resources should be a bit
> faster. It is vital for event(libevent).
I don't have any benchmark on that level and there are many things
influencing this, but the internal storage for all resources is a linked
list, the object storage is an array.
johannes