I made a rough comparison of the speed of the DI container I am developing with Laravel's DI container.

It was about 10 times faster. It took about twice as long as the normal new Class().

Very impressive! @saki

- does it cache the objects it creates?

- are you taking into account that using the command adds extra overhead in building the app? (why not $container = new \Illuminate\Container\Container)

- where can i find the repo? to race 🏎️ (new \Ghostwriter\Container\Container)… for science?

@ghostwriter @saki
Thank you for your feedback!

- There is no object caching.
- Since the execution time measurement starts after app(), I believe that overhead has no effect.
- There is a repository, but be aware that it is still very buggy and will soon give you runtime errors.

https://github.com/SakiTakamachi/pdi

GitHub - SakiTakamachi/pdi: Pdi - Dependency injection

Pdi - Dependency injection. Contribute to SakiTakamachi/pdi development by creating an account on GitHub.

GitHub