On Thu, Jan 10, 2013 at 2:59 PM, Stas Malyshev <smalys...@sugarcrm.com> wrote: >> We could export zend_qsort_r starting in 5.5; I need it ext/standard so >> it need not be exported, which would be problematic on a stable branch. >> It's undefined behavior because the comparison function is being called >> with one extra pointer argument. This is the same technique glibc uses >> though, so it should be safe. I could not find any measurable >> performance penalty. > > I think this is OK for 5.5, but I'm kind of worried about the function > parameter mismatch. PHP is run on all kinds of platforms, including > those where glibc is never heard of :) Are we sure it's safe on all > platforms to do this?
I urge you to be very careful. I compile PHP on intel compilers and have seen some performance benefit to doing so. Make sure it is cross-platform, please. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php