Date: 08/10/99
- Next message: Zeev Suraski: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Previous message: gregori: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Next in thread: gregori: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Reply: gregori: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 19:00 10/08/99 , Andi Gutmans wrote:
but a compile-time switch will be more than a good news ... and a level
>>of 1 million will be safe.
>
>After all I said, it can be improved, for example, in zend_execute.c you
>can change on line 860+ the do_alloca and free_alloca macro's to use
>emalloc and efree. However, it'll slow things down a bit.
I have nothing to add about the technical aspects - but I just want to
stress that the limit you're talking about, of one million nesting levels,
is completely ridiculous. Generally, if you have a script that calls ANY
function one million times, whether it's recursive or not, you shouldn't be
using a scripting language. Moreover, recursive algorithms are almost
inefficient to implement in structured languages, and you should never ever
reach a depth of that magnitude. As a rule of the thumb, if you reached a
depth level of more than a few thousand functions (which should be also
very very very rare) - it's time to go back to the drawing board, since
you're doing something wrong.
Zeev
-- Zeev Suraski <zeev <email protected>> http://www.zend.com/ For a PGP public key, finger bourbon <email protected>-- 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: Zeev Suraski: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Previous message: gregori: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Next in thread: gregori: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Reply: gregori: "Re: [PHP-DEV] PHP 4.0 Bug #2004: recursive call limitation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

