These are the results of my experiments using league/container
to create 100k objects and calling 100k callables.
When using no reflection, the container is first made aware of all the object/functions and their dependencies.
PHP Version | Time creating objects (in ms) | Time to call callables (in ms) |
---|---|---|
5.3.29 (no reflection) | 2057 | 2957 |
5.3.29 (with reflection) | 2297 | 3387 |
5.4.38 (no reflection) | 1315 | 1906 |
5.4.38 (with reflection) | 1396 | 2252 |
5.5.22 (no reflection) | 1263 | 1825 |
5.5.22 (with reflection) | 1380 | 2241 |
5.6.6 (no reflection) | 1189 | 1775 |
5.6.6 (with reflection) | 1333 | 2101 |