On 01/09/2013 06:51 PM, Johannes Schlüter wrote:
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

Thanks. I'll keep going with resources then :)


--
Regards,

Ruslan Osmanov

http://osmanov-dev-notes.blogspot.com | @ruslan_osmanov

--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to