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 |