Re: Adding Tokyo Tyrant extension to PECL
| From: | Bertrand Mansion | Date: | Fri, 10 Jul 2009 22:56:20 +0000 |
| Subject: | Re: Adding Tokyo Tyrant extension to PECL | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-6524@lists.php.net to get a copy of this message | ||
Le 10 juil. 09 à 15:48, Mikko Koppanen a écrit :
Hello, I've been working on a Tokyo Tyrant extension and it is getting for the first release in PECL. Currently it is maintained in github: http://github.com/mkoppanen/php-tokyo_tyrant/tree/master. I received some feedback from Nymul Islam who was initially working on the extension and it should now work with PHP 5.2 and 5.3. The extension provides an API to Tokyo Tyrant key-value store, the table API (queries, searches) and a session handler. The extension would be named "tokyo_tyrant".Hi Mikko, Thanks for this, it must have been a lot of work. I have made a quick benchmark against my pure PHP implementation which you can find there: http://mamasam.indefero.net/p/tyrant/ I have used the stress test you provide in the tests directory, here are the results for this one with a .tch db: PECL : Putting 100000 values.. took: 7.8530149459839 Getting 100000 values.. took: 7.6859409809113 Deleting 100000 values.. took: 8.0005769729614 Pure PHP : Putting 100000 values.. took: 9.3904848098755 Getting 100000 values.. took: 11.344342947006 Deleting 100000 values.. took: 9.5427911281586 I did the same test with the Table API and an array of data: PECL : Putting 100000 values.. took: 9.9819478988647 Getting 100000 values.. took: 8.6610591411591 Deleting 100000 values.. took: 8.6777820587158 Pure PHP: Putting 100000 values.. took: 12.997476816177 Getting 100000 values.. took: 19.740942001343 Deleting 100000 values.. took: 9.9810090065002 I find it weird that get is so much slower in my implementation, I'll try to see why... I haven't looked at the code very carefully but I noticed that you didn't incorporate the latest kind of query condition based on fulltext:
/**
* Query condition: full-text search with the phrase of the expression
*/
const QCFTSPH = 15;
/**
* Query condition: full-text search with all tokens in the expression
*/
const QCFTSAND = 16;
/**
* Query condition: full-text search with at least one token in the expression
*/
const QCFTSOR = 17;
/**
* Query condition: full-text search with the compound expression
*/
const QCFTSEX = 18;
I will try to have a closer look.
Regards,