You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A not-so-scientific speed test. In WordPress templates are checked using `file_exists` so I want to compare tha methods speed against a collection of `in_array` tests. The reason for this is because I can skip those `file_exists` checks if I override the WordPress template locating system with an array collection.
2
+
3
+
Run Commands:
4
+
5
+
```
6
+
// args: string "starting with a", "num times to run"
7
+
php exists.php a 10000
8
+
php object.php a 10000
9
+
```
10
+
11
+
### Small Set ~100 calls
12
+
13
+
-*Object*: `0.425ms`
14
+
-*File*: `0.602ms`
15
+
16
+
My conclusion is that the replacement can be done without a large performance impact (if not being faster).
0 commit comments