thobbs / phpcassa

PHP client library for Apache Cassandra
thobbs.github.com/phpcassa
MIT License
248 stars 78 forks source link

Performance boost for Composite types with exactly two types #147

Closed alonpeer closed 8 years ago

alonpeer commented 10 years ago

2 substr() function calls instead of 6 per call to unpack()

thobbs commented 10 years ago

It looks like you forgot to add the DualCompositeType class to the branch.

alonpeer commented 10 years ago

I was in a hurry and forgot my git add :) Here it is.

alonpeer commented 10 years ago

I see that PHP 5.3 is used for the tests and not 5.4. I'll adapt my code tomorrow and commit again.

alonpeer commented 10 years ago

@thobbs I guess my understanding of pack/unpack isn't so good, I can't figure out why my solution doesn't pass the tests. I'd love your two Cents :)