https://github.com/heapy/di-comparison
DI containers comparison
https://github.com/heapy/di-comparison
di-comparison di-containers
Last synced: about 1 month ago
JSON representation
DI containers comparison
- Host: GitHub
- URL: https://github.com/heapy/di-comparison
- Owner: Heapy
- Created: 2021-01-11T00:14:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T14:18:19.000Z (about 4 years ago)
- Last Synced: 2025-04-06T06:22:28.634Z (about 1 month ago)
- Topics: di-comparison, di-containers
- Language: Java
- Homepage:
- Size: 178 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DI Containers Comparison
Comparing a simple app varieties on different DI containers.
## IntelliJ IDEA Setup
Go to "Preferences > Annotation Processors", and check "Enable Annotation
Processing".## "Benchmark"
```
# Build
./gradlew clean build installDist distTar# Run
TestRunner in common-deep/src/test/kotlin
```## Test machine
```
MacBook Pro (16-inch, 2019)
Processor: 2,6 GHz 6-Core Intel Core i7
Memory: 32 GB 2667 MHz DDR4openjdk 11.0.10 2021-01-19 LTS
OpenJDK Runtime Environment Corretto-11.0.10.9.1 (build 11.0.10+9-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.10.9.1 (build 11.0.10+9-LTS, mixed mode)
```## Results for JVM (JDK 11)
|DI|Jar w/Deps Size, Mb|:arrow_down: Exec time, s|LoC|
|----|----|----|----|
|jvm|1.69|111|2|## Results for 2 classes (JDK 11)
|DI|Jar w/Deps Size, Mb|:arrow_down: Exec time, ms|LoC|
|----|----|----|----|
|kotlin-lazy|1.69|118|16|
|baseline|1.69|130|7|
|dagger|1.73|130|37|
|cayennedi|1.76|158|37|
|koin|1.85|160|16|
|koin-reflect|1.88|170|17|
|kodein|2.36|180|17|
|bootique|4.18|229|52|
|guice|5.42|331|33|
|spring|5.60|356|23|
|komodo|6.41|392|17|
|spring-scan|5.60|410|13|
|owb|3.05|421|35|
|spring-xml|5.60|430|19|
|springboot|9.73|916|42|## Results for 100 classes (JDK 11)
|DI|Jar w/Deps Size, Mb|:arrow_down: Exec time, ms|LoC|
|----|----|----|----|
|baseline-deep|1.83|142|107|
|kotlin-lazy-deep|1.91|158|313|
|dagger-deep|1.96|163|534|
|cayennedi-deep|1.95|212|1444|
|koin-deep|2.13|216|113|
|koin-reflect-deep|2.51|241|114|
|bootique-deep|4.31|280|549|
|kodein-deep|2.92|284|114|
|guice-deep|5.56|407|530|
|spring-deep|5.73|469|420|
|komodo-deep|6.64|531|114|
|spring-xml-deep|5.72|559|319|
|owb-deep|3.18|584|532|
|spring-scan-deep|5.73|687|13|
|springboot-deep|9.85|1054|439|