| | |
Toll of a function call
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
What is the toll of a function call? Is looping 200,000 times calling a function that performs a small calculation each time a lot more resource intensive than just performing that small calculation inline?
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Well, according to this http://hudzilla.org/phpwiki/index.ph...function_calls it is, and zend.com has the following to say on it in this page about optimizing php http://www.zend.com/zend/trick/trick-optimizing-php.php
•
•
•
•
Function calls carry a high overhead. You can get a bump in performance if you eliminate a function. Compiled languages, such as C and Java, have the luxury of replacing function calls with inline code. You should avoid functions that you only call once. One technique for readable code is to use functions to hide details. This technique is expensive in PHP.
![]() |
Similar Threads
- Runtime Error - R 6025 - pure virtual function call (Windows NT / 2000 / XP)
- Variables not updated in JS function call (JavaScript / DHTML / AJAX)
- Can we call a User defined Function using Linked Servers ? (MS SQL)
- no matching function for call to 'strcmp(std::string&, std::string&)' (C++)
- call a function (C)
- Function call problem (HTML and CSS)
- System() Function: Info on uses & Description (C++)
- how to call this function...using menu..! (C++)
Other Threads in the PHP Forum
- Previous Thread: problem with counter
- Next Thread: Replacing strings
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date development directory display download dynamic echo email error file files filter folder form forms function functions gc_maxlifetime google host href htaccess html image include insert integration ip java javascript joomla limit link login loop mail memmory memory menu mlm mod_rewrite multiple mysql navigation oop parse parsing paypal pdf php problem query radio random recursion regex remote script search server sessions sms snippet soap source space sql structure syntax system table thesishelp tutorial update upload url validation validator variable video web xml youtube






