Skip to content

Instantly share code, notes, and snippets.

@hannesvdvreken
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannesvdvreken/5d2341a91e76614f80ad to your computer and use it in GitHub Desktop.
Save hannesvdvreken/5d2341a91e76614f80ad to your computer and use it in GitHub Desktop.
Reflection tests accross php

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment