Home  >  Article  >  Backend Development  >  Search performance test of php function

Search performance test of php function

小云云
小云云Original
2018-03-16 11:36:561438browse

Used to observe the impact of Drupal modules on performance. The number of modules directly affects the number of hook function searches, and the function search speed affects performance. This article mainly shares with you the PHP function search performance test, hoping to help everyone.

Pay attention to the impact of the number of modules on overall performance, hooks are only one of them:

";
    }
}
$end_time=microtime(TRUE);
echo "$start_time
$end_time
time:
"; echo $end_time - $start_time;


Test results:
Load 10,000 randomly named functions and find 10,000 The time consumption of a random function name is less than 2 milliseconds, and the impact is minimal. It can be considered that drupal's hook search does not affect performance

Test machine configuration:
cpu: Intel i5-7200U
Memory: 8G
system: win10

The above is the detailed content of Search performance test of php function. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn