PHP Function execution cost table -


Is there a reference table that shows the performance cost of every PHP function?

I know that time execution is the limit of many factors and it is impossible to determine a unique value, but looking for a 'conceptual' table. For example,

  is_dir () = Cost 3 is_file () = Cost 2  

(Take it as an example now;) < / P>

If I do not mind bad,

edit for C: I read all the comments to you, and therefore a table for my needs is.

Anyway, I know that

  is_dir ('/'); // is faster than is_dir ('/ a / very / long / path / to / check /');  

But, I have some difficulty in accepting this situation (if, I have understood your words right then it is possible);

  $ a = '/'; $ B = '/ a / lot / tall / path / to / check /'; Is_dir ($ one); // Time execution 0.003 is_file ($ a); // Time execution 0.005 // It seems that is_dir is faster than is_file // (still examples, the names and numbers of the functions are random;) is_dir ($ b); // time execution 0.013 is_file ($ b); // time execution 0.009 // wow, is fast now is_file () ....?  

Such a chart will not be helpful or correct in your example, the time of the function is local filing The details of the system will be very much dependent and will quickly become meaningless.

The only correct way to measure performance is to make your code, then time. While faster than comparison? It may be better than one situation, while the second will be faster in another situation, depending on the factors of all kinds, the code will be specific.

Get profiles, and some meaningful data that is right for your project on your server environment.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -