Date: 04/24/00
- Next message: Joey: "Re: [PHP-DEV] Bug #4191 Updated: Compile fails due to unknown storage size"
- Previous message: Thomas E. Ruth: "Re: [PHP-DEV] Compiling PHP3 with IBM DB2 support"
- In reply to: Faisal Nasim: "[PHP-DEV] Re: [PHP3] Re: [PHP-DEV] Re: [PHP3] PHP Speed Optimization"
- Next in thread: Ron Chmara: "[PHP-DEV] Re: [PHP3] Re: [PHP-DEV] Re: [PHP3] PHP Speed Optimization"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 01:53 AM 4/25/00 +0500, Faisal Nasim wrote:
>| Say you have 30 user-built functions in *one* file, 200 lines of code.
>| Depending on your code base/version, if those are called 10 times per
>page,
>| you need to include that code for the parser (file call), and
>| then as you go through the page, it substitutes out the function code....
>| plus you've added 20 useless functions of overhead for *every*
>| parsed page. (Hence, the speed differences between 3 and 4, and the
>| problem with using functions in 3. They *will* bog your execution
>| down)
>
>Its there parsed once sitting in the memory, it doesn't actually
>substitute the function contents with the function call and then
>process is as if it was embedded in the code itself! Its done
>through a smart method.
>
>|
>| Lots and lots of overhead in that. If you can strip excess functions
>| out, and speed is your goal, by all means, dump them over the side
>| as fast as you can, and explicitly code using PHP's internal
>| functions. Try two or three variants on your code, to see if, for
>| example, you could get a faster result from a printf or an echo,
>| a faster loop by only testing (if/case) under a smaller set of
>| circumstances, and, if you can, avoid *ever* using requires or
>| includes....
>
>Seems like you have mixed C with PHP. PHP functions don't
>have overhead like C does (unless they are inline, the overhead
>is negligible, but its there!)
PHP function calls have overhead similar to the way C does. The parameters
are passed etc. etc..
Andi
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Joey: "Re: [PHP-DEV] Bug #4191 Updated: Compile fails due to unknown storage size"
- Previous message: Thomas E. Ruth: "Re: [PHP-DEV] Compiling PHP3 with IBM DB2 support"
- In reply to: Faisal Nasim: "[PHP-DEV] Re: [PHP3] Re: [PHP-DEV] Re: [PHP3] PHP Speed Optimization"
- Next in thread: Ron Chmara: "[PHP-DEV] Re: [PHP3] Re: [PHP-DEV] Re: [PHP3] PHP Speed Optimization"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

