/benchmark-ioc

Benchmark for Java IoC container frameworks.

Primary LanguageJavaBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Java IoC Frameworks Benchmark

This is a short benchmark presenting the speed of different Java IoC containers.

How was the benchmak performed?

Each tested framework was to instantiate 10 000 000 prototype beans (Base class), each one with a prototype dependency injected (SampleImpl class).

alt text

The result time a total time spent on:

  • creating Base class,
  • getting SampleImpl class from it,
  • invoking a sample foo() method.

Results

alt text

Conclusion

The winner is Dagger. That IoC is suitable for both: Android and Java. Its power is in the annotation preprocessing during compilation time. You can read more here: http://square.github.io/dagger/.