Re: com php-src: Faster sorting algo: UPGRADING Zend/Makefile.am Zend/tests/methods-on-non-objects-usort.phpt Zend/zend_API.c Zend/zend_hash.c
Zend/zend_hash.h Zend/zend_ini.c Zend/zend_llist.c Zend/zend_qsort.c Zend/zend_qsort.h Zend/zend_sort.c Zend/zend_sort.h Zend/zend_ts_hash.c
Zend/zend_types.h configure.in ext/ereg/ereg.c ext/intl/collator/collator_sort.c ext/phar/dirstream.c ext/phar/phar_internal.h ext/standard/array.c
ext/standard/info.c ex
| From: | Rasmus Lerdorf | Date: | Mon, 19 Jan 2015 05:03:04 +0000 |
| Subject: | Re: com php-src: Faster sorting algo: UPGRADING Zend/Makefile.am Zend/tests/methods-on-non-objects-usort.phpt Zend/zend_API.c Zend/zend_hash.c Zend/zend_hash.h Zend/zend_ini.c Zend/zend_llist.c Zend/zend_qsort.c Zend/zend_qsort.h Zend/zend_sort.c Zend/zend_sort.h Zend/zend_ts_hash.c Zend/zend_types.h configure.in ext/ereg/ereg.c ext/intl/collator/collator_sort.c ext/phar/dirstream.c ext/phar/phar_internal.h ext/standard/array.c ext/standard/info.c ex |
||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80765@lists.php.net to get a copy of this message | ||
On 01/18/2015 09:00 PM, Andrea Faulds wrote:
> That would also mean a future sorting API could unify user sorts and non-user sorts: just make
> the default callback be cmp().
>
> Usage would be like this:
>
> cmp(1, 2); // 1
> cmp(1, 1); // 0
> cmp(2, 1); // 1
>
> Essentially, exactly like the spaceship in Perl, but a function.
>
> Thoughts?
Well, if you really meant that would be the output, perhaps we should
get someone else to write it. :)
-Rasmus
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc