Re: Intel icc compiler warnings

From: Date: Tue, 21 Sep 2004 01:02:52 +0000
Subject: Re: Intel icc compiler warnings
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-12918@lists.php.net to get a copy of this message
I have done some playing around with Intel compiler. It usually tends to be faster 10-20% but it depends on the flags you use, inlining of the program (Intel compiler seems to optimize inlines much better). Andi At 10:34 PM 9/18/2004 -0700, Rasmus Lerdorf wrote:
Out of curiosity I built HEAD with Intel's icc 8.1 compiler on my Debian laptop today. The full set of warnings (425k worth) are at: http://lerdorf.com/icc_warnings.txt There are some fun ones in there, like these: /home/rasmus/php-src/Zend/zend_alloc.c(252): warning #186: pointless comparison of unsigned integer with zero
                        && offset >= 0) {
                                  ^
Zend/zend_execute.h(83): warning #1572: floating-point equality and inequality comparisons are unreliable
                        result = (op->value.dval ? 1 : 0);
                                                   ^
/home/rasmus/php-src/sapi/cli/php_cli.c(773): warning #25: quoted string should contain at least one character
                        case '': /* generate indented source mode*/
                             ^
/home/rasmus/php-src/ext/session/mod_files.c(332): warning #266: function declared implicitly
        n = pread(data->fd, *val, sbuf.st_size, 0);
            ^
/home/rasmus/php-src/ext/session/mod_files.c(368): warning #266: function declared implicitly
        n = pwrite(data->fd, val, vallen, 0);
            ^
The invalid attribute and unsigned vs. signed warnings really clutter things up making it hard to find the more interesting warnings. The icc compiled libphp5.so was 9,816,098 bytes vs. 11,804,220 for gcc. Other things I compiled also consistently showed icc creating much smaller binaries. But that appears to just be due to a lot more symbol info. If I strip both I get: gcc libphp5.so 2,590,412 icc libphp5.so 2,793,780 Performance-wise it seems the icc binary is slower, but that is only from a very unscientific benchmark and I wonder if loading an icc php binary into a gcc Apache binary might not slow things down a bit. I haven't looked into the gcc compatibility libraries icc ships with to understand that well enough. But on first glance icc appears to generate a larger and slower libphp5.so. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#12918) next »