Support / use SplFixedArray?

65 views
Skip to first unread message

Rob C

unread,
Jun 20, 2013, 10:19:33 PM6/20/13
to phpc...@googlegroups.com
Hey, just curious what your thoughts are on using and/or supporting SplFixedArray instead of PHP arrays in some parts of the library?

I'm sure it's a lot of work all around, and there are a variety of ways to implement. Obviously, this might cause compatibility issues with older versions of PHP and also would not work on servers that are missing the library.

I could help code some of it, but .. figure it's worth talking about before any work is done. What do you think.

Tyler Hobbs

unread,
Jun 21, 2013, 1:45:06 PM6/21/13
to phpc...@googlegroups.com
I'm not convinced that there would be huge performance gains from using SplFixedArray, but you're welcome to try.  In terms of implementation details, I would suggest adding new return format similar to ARRAY_FORMAT, which should avoid backwards-incompatible breaks.

phpcassa only supports PHP 5.3+, so you don't have to worry about older versions of php.

--
Tyler Hobbs
DataStax

prathap kumar

unread,
Feb 6, 2014, 9:24:05 AM2/6/14
to phpc...@googlegroups.com
Hi
The main differences between a SplFixedArray and a normal PHP array is that the SplFixedArray is of fixed length and allows only integers within the range as indexes. The advantage is that it allows a faster array implementation

Prathap

Reply all
Reply to author
Forward
0 new messages