Giter Club home page Giter Club logo

di-comparison's Introduction

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 DDR4

openjdk 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 ⬇️ Exec time, s LoC
jvm 1.69 111 2

Results for 2 classes (JDK 11)

DI Jar w/Deps Size, Mb ⬇️ 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 ⬇️ 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

di-comparison's People

Contributors

andrus avatar irus avatar struberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.