diff --git a/README.md b/README.md new file mode 100644 index 0000000..32ac51c --- /dev/null +++ b/README.md @@ -0,0 +1,244 @@ +# Stitch + +[![Build](https://img.shields.io/github/actions/workflow/status/harrytmthy/stitch/ci.yml?branch=main&label=build&logo=githubactions&logoColor=white&style=flat-square)](https://github.com/harrytmthy/stitch/actions) +[![License](https://img.shields.io/github/license/harrytmthy/stitch?label=license&color=blue&style=flat-square)](https://github.com/harrytmthy/stitch/blob/main/LICENSE) + +A Kotlin Multiplatform dependency injection library with a precompiled path and a runtime +registration path, designed to replace the Dagger + Koin split with one consistent model. + +## Why Stitch? + +Today, dependency injection tools often force a tradeoff: + +- **Dagger 2** is fast, but no runtime binding registration and no multiplatform support. +- **Koin** allows runtime registration, but has slower resolutions and higher APK-size impact. +- Using **Dagger 2 + Koin** means carrying two mental models and the combined trade-offs. + +Stitch brings both models into one library without the combined trade-offs: + +- **Precompiled path** for generated graphs and top-tier injection performance +- **Runtime registration path** for dynamic bindings and feature-driven registration + +## At a Glance + +| Capability | Stitch | Dagger 2 | Koin | +|------------------------------------|:-------------------:|:---------:|:---------:| +| Runtime binding registration | ✅ | ❌ | ✅ | +| Parent-child scope dependencies | ✅ | ✅ | ❌ | +| Kotlin Multiplatform support | ✅ | ❌ | ✅ | +| Injection performance | ✅ Fastest | ✅ Fast | ❌ Slowest | +| APK size impact on larger graphs | ✅ Lowest | ✅ Low | ❌ Highest | +| Build-time impact on larger graphs | ✅ Lower than Dagger | ❌ Highest | ✅ Lowest | + +**Note:** "Larger graphs" refers to projects with 100-200+ registered bindings. + +## Installation + +### Runtime registration path + +```kotlin +dependencies { + implementation("io.github.harrytmthy:stitch:1.0.0-rc01") +} +``` + +### Precompiled path + +```kotlin +dependencies { + implementation("io.github.harrytmthy:stitch:1.0.0-rc01") + compileOnly("io.github.harrytmthy:stitch-annotations:1.0.0-rc01") + ksp("io.github.harrytmthy:stitch-ksp:1.0.0-rc01") +} +``` + +You can use either path independently, or combine both in the same project. + +## Basic Usage + +### Runtime registration path + +Create a scope reference and a module: + +```kotlin +// Top-level declaration +val activityScope = scope("activity") + +val coreModule = module { + singleton { LoggerImpl() }.bind() +} + +val homeModule = module { + factory { HomeConfig() } + scoped(activityScope) { HomeViewModel(logger = get(), config = get()) } +} +``` + +Register the modules: + +```kotlin +Stitch.register(coreModule, homeModule) + +// Alternatively, in a multi-module environment +coreModule.register() // or Stitch.register(coreModule) +homeModule.register() // or Stitch.register(homeModule) +``` + +Resolve singleton and factory bindings: + +```kotlin +val config: HomeConfig = Stitch.get() + +// Lazy initialization +val logger by Stitch.inject() +``` + +Resolve scoped bindings: + +```kotlin +val homeActivityScope = activityScope.createScope() +homeActivityScope.open() + +val viewModel: HomeViewModel = homeActivityScope.get() + +// Cleanup +homeActivityScope.close() +``` + +Use `dependsOn()` to establish parent-child dependencies: + +```kotlin +// One-time setup +val fragmentScope = scope("fragment").dependsOn(activityScope) + +// Use it anywhere +val homeActivityScope = activityScope.createScope().apply { open() } +val homeFragmentScope = homeActivityScope.createChildScope(fragmentScope).apply { open() } +val activityViewModel = homeFragmentScope.get() +``` + +### Precompiled path + +#### One-time setup + +Annotate any class in the main module with `@StitchRoot`: + +```kotlin +@StitchRoot +class SampleApp : Application() +``` + +Build, then initialize the generated root graph: + +```kotlin +StitchInjector.init(StitchSingletonGraph()) +``` + +Add other scopes, where each scope represents a generated graph: + +```kotlin +@Scope // Any scope is a child of @Singleton by default +@Retention(AnnotationRetention.BINARY) +annotation class Activity + +@Scope +@DependsOn(Activity::class) // Makes @Fragment a child of @Activity +@Retention(AnnotationRetention.BINARY) +annotation class Fragment +``` + +#### Providing and requesting bindings + +To provide a binding, use an `@Inject`-annotated constructor or an `@Provides`-annotated function: + +```kotlin +@Activity +class HomeViewModel @Inject constructor( + private val logger: Logger, +) : ViewModel() { /* ... */ } + +// Anywhere, even at top-level +@Singleton +@Provides +@Binds(aliases = [Logger::class]) // Binds LoggerImpl to Logger +fun provideLogger(): LoggerImpl = LoggerImpl() +``` + +To request the provided binding, use an `@Inject`-annotated field: + +```kotlin +class HomeActivity : AppCompatActivity() { + + @Inject + lateinit var viewModel: HomeViewModel +} +``` + +`HomeViewModel` is provided in `@Activity`, while the parent of `@Activity` is `@Singleton`. So, +to inject it, create the activity graph's injector from its parent: + +```kotlin +val activityInjector = StitchInjector.getSingletonGraph() + .createInjectorForChildScope("activity") // Case-insensitive + +// Injects HomeViewModel and other @Inject-annotated fields (if any) +activityInjector.inject(this) +``` + +Unlike Dagger 2, there is no `@Module` or `@Component`. Graphs are generated in the same module as +the `@StitchRoot`-annotated class. + +## Performance Benchmarks + +Stitch was benchmarked across three dimensions: + +### Injection performance + +Stitch is **1.10-1.20× faster than Dagger 2** and **19-22× faster than Koin**. + +![Injection Performance](docs/charts/injection-performance-chart.png) + +| Bindings | Stitch | Dagger 2 | Koin | +|----------|------------------|------------------------------|-----------------------------| +| 10 | **363.41 ns** | 429.67 ns *(1.18× slower)* | 6,934.35 ns *(19× slower)* | +| 25 | **814.54 ns** | 898.73 ns *(1.10× slower)* | 17,511.96 ns *(21× slower)* | +| 50 | **1,634.60 ns** | 1,806.24 ns *(1.10× slower)* | 35,772.29 ns *(22× slower)* | +| 100 | **3,640.85 ns** | 4,384.39 ns *(1.20× slower)* | 73,161.62 ns *(20× slower)* | + +### APK size impact + +Stitch stays **5-10× below Koin** across all graph sizes. Dagger has a smaller APK footprint on +small graphs, but Stitch crosses below Dagger at ~200 bindings. + +![APK Size Impact](docs/charts/apk-size-impact-chart.png) + +| Bindings | Stitch | Dagger 2 | Koin | +|----------|--------------|-----------------------------|--------------------------| +| 10 | **+35.5 KB** | +14.4 KB *(0.41× larger)* | +370.4 KB *(10× larger)* | +| 50 | **+43.4 KB** | +31.6 KB *(0.73× larger)* | +375.3 KB *(9× larger)* | +| 100 | **+53.1 KB** | +46.1 KB *(0.87× larger)* | +382.4 KB *(7× larger)* | +| 200 | **+78.2 KB** | +84.0 KB *(1.07× larger)* | +398.1 KB *(5× larger)* | + +### Build-time impact + +Stitch has a larger build-time overhead than Dagger on small graphs, but crosses below Dagger at +~100 bindings and scales better from there. Koin has the smallest overhead. + +![Build-time Impact](docs/charts/build-time-impact-chart.png) + +| Bindings | Stitch | Dagger 2 | Koin | +|----------|------------------|-------------------------------|-----------------------------| +| 10 | **+878.42 ms** | +377.69 ms *(0.43× larger)* | +91.03 ms *(0.10× larger)* | +| 50 | **+907.34 ms** | +817.78 ms *(0.90× larger)* | +162.14 ms *(0.18× larger)* | +| 100 | **+1,095.39 ms** | +1,164.09 ms *(1.06× larger)* | +79.53 ms *(0.07× larger)* | +| 200 | **+1,330.23 ms** | +1,754.03 ms *(1.32× larger)* | +19.10 ms *(0.01× larger)* | + +Stitch scales better than Dagger as graph size grows, while remaining far ahead of Koin in injection +performance and APK size impact. + +## License + +```text +Apache License 2.0 +Copyright (c) 2026 Harry Timothy Tumalewa +``` diff --git a/benchmark/build.gradle.kts b/benchmark/build.gradle.kts index 35554d0..f9d928a 100644 --- a/benchmark/build.gradle.kts +++ b/benchmark/build.gradle.kts @@ -88,6 +88,27 @@ abstract class GenerateFixturesTask : DefaultTask() { appendLine("}") }) + // Factory injection target (for cold-path factory benchmarks) + dir.resolve("FactoryInjectionTarget.kt").writeText(buildString { + appendLine("package $pkg") + appendLine() + appendLine("import com.harrytmthy.stitch.api.Stitch") + appendLine("import javax.inject.Inject") + appendLine("import org.koin.core.Koin") + appendLine() + appendLine("class FactoryInjectionTarget {") + appendLine(" @Inject lateinit var service1: Service1Factory") + appendLine() + appendLine(" fun injectWithKoin(koin: Koin) {") + appendLine(" service1 = koin.get()") + appendLine(" }") + appendLine() + appendLine(" fun injectWithStitch() {") + appendLine(" service1 = Stitch.get()") + appendLine(" }") + appendLine("}") + }) + // Stitch precompiled path wiring dir.resolve("StitchPrecompiledFixture.kt").writeText(buildString { appendLine("package $pkg") @@ -99,10 +120,17 @@ abstract class GenerateFixturesTask : DefaultTask() { for (i in 1..n) { appendLine("interface Service$i") appendLine() - val dep = if (i == 1) "" else "val dep: Service${i - 1}Impl" + val dep = if (i == 1) "" else "val dep: Service${i - 1}Singleton" appendLine("@Binds(aliases = [Service${i}::class])") appendLine("@Singleton") - appendLine("class Service${i}Impl @Inject constructor($dep) : Service$i") + appendLine("class Service${i}Singleton @Inject constructor($dep) : Service$i") + appendLine() + } + // Factory classes: descending chain (Service1Factory depends on Service2Factory) + // so resolving Service1Factory always traverses the full depth on every call + for (i in 1..n) { + val dep = if (i == n) "" else "val dep: Service${i + 1}Factory" + appendLine("class Service${i}Factory @Inject constructor($dep)") appendLine() } }) @@ -121,7 +149,7 @@ abstract class GenerateFixturesTask : DefaultTask() { for (i in 1..n) { appendLine() appendLine(" @Binds") - appendLine(" fun bindService$i(impl: Service${i}Impl): Service$i") + appendLine(" fun bindService$i(impl: Service${i}Singleton): Service$i") } appendLine("}") appendLine() @@ -129,6 +157,7 @@ abstract class GenerateFixturesTask : DefaultTask() { appendLine("@Component(modules = [DaggerFixtureModule::class])") appendLine("interface DaggerFixtureComponent {") appendLine(" fun inject(target: InjectionTarget)") + appendLine(" fun inject(target: FactoryInjectionTarget)") appendLine("}") }) @@ -136,13 +165,17 @@ abstract class GenerateFixturesTask : DefaultTask() { dir.resolve("KoinFixture.kt").writeText(buildString { appendLine("package $pkg") appendLine() + appendLine("import org.koin.core.module.dsl.factoryOf") appendLine("import org.koin.core.module.dsl.singleOf") appendLine("import org.koin.dsl.bind") appendLine("import org.koin.dsl.module") appendLine() appendLine("val koinFixtureModule = module {") for (i in 1..n) { - appendLine(" singleOf(::Service${i}Impl) bind Service${i}::class") + appendLine(" singleOf(::Service${i}Singleton) bind Service${i}::class") + } + for (i in 1..n) { + appendLine(" factoryOf(::Service${i}Factory)") } appendLine("}") }) @@ -157,8 +190,12 @@ abstract class GenerateFixturesTask : DefaultTask() { appendLine() appendLine("val stitchRuntimeFixtureModule = module {") for (i in 1..n) { - val dep = if (i == 1) "Service${i}Impl()" else "Service${i}Impl(dep = get())" - appendLine(" singleton { $dep }.bind()") + val dep = if (i == 1) "Service${i}Singleton()" else "Service${i}Singleton(dep = get())" + appendLine(" singleton { $dep }.bind()") + } + for (i in 1..n) { + val dep = if (i == n) "Service${i}Factory()" else "Service${i}Factory(dep = get())" + appendLine(" factory { $dep }") } appendLine("}") }) diff --git a/benchmark/src/androidTest/kotlin/com/harrytmthy/stitch/benchmark/StitchVsDaggerVsKoinBenchmark.kt b/benchmark/src/androidTest/kotlin/com/harrytmthy/stitch/benchmark/StitchVsDaggerVsKoinBenchmark.kt index d3c399a..84c31ad 100644 --- a/benchmark/src/androidTest/kotlin/com/harrytmthy/stitch/benchmark/StitchVsDaggerVsKoinBenchmark.kt +++ b/benchmark/src/androidTest/kotlin/com/harrytmthy/stitch/benchmark/StitchVsDaggerVsKoinBenchmark.kt @@ -22,6 +22,7 @@ import androidx.benchmark.junit4.BenchmarkRule import androidx.benchmark.junit4.measureRepeated import com.harrytmthy.stitch.api.Stitch import com.harrytmthy.stitch.benchmark.fixture.DaggerDaggerFixtureComponent +import com.harrytmthy.stitch.benchmark.fixture.FactoryInjectionTarget import com.harrytmthy.stitch.benchmark.fixture.InjectionTarget import com.harrytmthy.stitch.benchmark.fixture.koinFixtureModule import com.harrytmthy.stitch.benchmark.fixture.stitchRuntimeFixtureModule @@ -56,7 +57,7 @@ class StitchVsDaggerVsKoinBenchmark { ) @Test - fun stitchPrecompiledFirstInject() { + fun stitchPrecompiledSingletonInject() { val target = InjectionTarget() benchmarkRule.measureRepeated { val singletonGraph = runWithMeasurementDisabled { @@ -67,74 +68,72 @@ class StitchVsDaggerVsKoinBenchmark { } @Test - fun stitchPrecompiledRepeatedInject() { + fun stitchRuntimeSingletonInject() { + Stitch.register(stitchRuntimeFixtureModule) val target = InjectionTarget() - val singletonGraph = StitchSingletonGraph() - singletonGraph.inject(target) // Warmup once benchmarkRule.measureRepeated { - singletonGraph.inject(target) + target.injectWithStitch() } + Stitch.reset() } @Test - fun stitchRuntimeFirstInject() { + fun daggerSingletonInject() { val target = InjectionTarget() benchmarkRule.measureRepeated { - runWithMeasurementDisabled { Stitch.register(stitchRuntimeFixtureModule) } - target.injectWithStitch() - runWithMeasurementDisabled { Stitch.reset() } + val fixtureComponent = runWithMeasurementDisabled { + DaggerDaggerFixtureComponent.create() + } + fixtureComponent.inject(target) } } @Test - fun stitchRuntimeRepeatedInject() { + fun koinSingletonInject() { + val koinApp = koinApplication { modules(koinFixtureModule) } val target = InjectionTarget() - Stitch.register(stitchRuntimeFixtureModule) - target.injectWithStitch() // Warmup once benchmarkRule.measureRepeated { - target.injectWithStitch() + target.injectWithKoin(koinApp.koin) } - Stitch.reset() + koinApp.close() } @Test - fun daggerFirstInject() { - val target = InjectionTarget() + fun stitchPrecompiledFactoryInject() { + val target = FactoryInjectionTarget() benchmarkRule.measureRepeated { - val fixtureComponent = runWithMeasurementDisabled { - DaggerDaggerFixtureComponent.create() + val singletonGraph = runWithMeasurementDisabled { + StitchSingletonGraph() } - fixtureComponent.inject(target) + singletonGraph.inject(target) } } @Test - fun daggerRepeatedInject() { - val target = InjectionTarget() - val fixtureComponent = DaggerDaggerFixtureComponent.create() - fixtureComponent.inject(target) // Warmup once + fun stitchRuntimeFactoryInject() { + Stitch.register(stitchRuntimeFixtureModule) + val target = FactoryInjectionTarget() benchmarkRule.measureRepeated { - fixtureComponent.inject(target) + target.injectWithStitch() } + Stitch.reset() } @Test - fun koinFirstInject() { - val target = InjectionTarget() + fun daggerFactoryInject() { + val target = FactoryInjectionTarget() benchmarkRule.measureRepeated { - val koinApp = runWithMeasurementDisabled { - koinApplication { modules(koinFixtureModule) } + val fixtureComponent = runWithMeasurementDisabled { + DaggerDaggerFixtureComponent.create() } - target.injectWithKoin(koinApp.koin) - runWithMeasurementDisabled { koinApp.close() } + fixtureComponent.inject(target) } } @Test - fun koinRepeatedInject() { + fun koinFactoryInject() { val koinApp = koinApplication { modules(koinFixtureModule) } - val target = InjectionTarget() - target.injectWithKoin(koinApp.koin) // Warmup once + val target = FactoryInjectionTarget() benchmarkRule.measureRepeated { target.injectWithKoin(koinApp.koin) } diff --git a/docs/benchmarks/apk-size-impact/apk-size-all-fixtures.json b/docs/benchmarks/apk-size-impact/apk-size-all-fixtures.json new file mode 100644 index 0000000..67f8a1c --- /dev/null +++ b/docs/benchmarks/apk-size-impact/apk-size-all-fixtures.json @@ -0,0 +1,117 @@ +{ + "apk_size_comparison": { + "title": "APK Size Impact - All Fixtures", + "unit": "bytes", + "note": "Release unsigned APKs. 'none' is the no-DI baseline.", + "results": [ + { + "name": "APK Size - 10 Fixtures", + "none": { + "bytes": 2806287, + "kb": 2740.5, + "delta_bytes": 0, + "delta_kb": 0 + }, + "koin": { + "bytes": 3185575, + "kb": 3110.9, + "delta_bytes": 379288, + "delta_kb": 370.4 + }, + "dagger": { + "bytes": 2821070, + "kb": 2755, + "delta_bytes": 14783, + "delta_kb": 14.4 + }, + "stitch": { + "bytes": 2842679, + "kb": 2776.1, + "delta_bytes": 36392, + "delta_kb": 35.5 + } + }, + { + "name": "APK Size - 50 Fixtures", + "none": { + "bytes": 2815175, + "kb": 2749.2, + "delta_bytes": 0, + "delta_kb": 0 + }, + "koin": { + "bytes": 3199507, + "kb": 3124.5, + "delta_bytes": 384332, + "delta_kb": 375.3 + }, + "dagger": { + "bytes": 2847506, + "kb": 2780.8, + "delta_bytes": 32331, + "delta_kb": 31.6 + }, + "stitch": { + "bytes": 2859571, + "kb": 2792.5, + "delta_bytes": 44396, + "delta_kb": 43.4 + } + }, + { + "name": "APK Size - 100 Fixtures", + "none": { + "bytes": 2827151, + "kb": 2760.9, + "delta_bytes": 0, + "delta_kb": 0 + }, + "koin": { + "bytes": 3218731, + "kb": 3143.3, + "delta_bytes": 391580, + "delta_kb": 382.4 + }, + "dagger": { + "bytes": 2874390, + "kb": 2807, + "delta_bytes": 47239, + "delta_kb": 46.1 + }, + "stitch": { + "bytes": 2881503, + "kb": 2814, + "delta_bytes": 54352, + "delta_kb": 53.1 + } + }, + { + "name": "APK Size - 200 Fixtures", + "none": { + "bytes": 2848999, + "kb": 2782.2, + "delta_bytes": 0, + "delta_kb": 0 + }, + "koin": { + "bytes": 3256683, + "kb": 3180.4, + "delta_bytes": 407684, + "delta_kb": 398.1 + }, + "dagger": { + "bytes": 2935066, + "kb": 2866.3, + "delta_bytes": 86067, + "delta_kb": 84 + }, + "stitch": { + "bytes": 2929103, + "kb": 2860.5, + "delta_bytes": 80104, + "delta_kb": 78.2 + } + } + ] + } +} \ No newline at end of file diff --git a/docs/benchmarks/build-time-impact/build-time-all-fixtures.json b/docs/benchmarks/build-time-impact/build-time-all-fixtures.json new file mode 100644 index 0000000..556c902 --- /dev/null +++ b/docs/benchmarks/build-time-impact/build-time-all-fixtures.json @@ -0,0 +1,101 @@ +{ + "benchmark_comparison": { + "title": "Clean Build Time - Stitch vs Dagger vs Koin vs None", + "unit": "milliseconds", + "note": "Gradle profiler clean build benchmark, 10 measure iterations. Task: :app:assembleXxxDebug. 'none' is the no-DI baseline.", + "benchmarks": [ + { + "name": "Clean Build - 10 Fixtures", + "none": { + "min": 5232.44, + "median": 5360.45, + "max": 5571.21 + }, + "koin": { + "min": 5294.92, + "median": 5451.48, + "max": 5710.11 + }, + "dagger": { + "min": 5526.54, + "median": 5738.14, + "max": 6567.94 + }, + "stitch": { + "min": 6141.75, + "median": 6238.87, + "max": 6526.05 + } + }, + { + "name": "Clean Build - 50 Fixtures", + "none": { + "min": 5105.65, + "median": 5367.44, + "max": 5889.48 + }, + "koin": { + "min": 5369.48, + "median": 5529.58, + "max": 5719.23 + }, + "dagger": { + "min": 6065.05, + "median": 6185.22, + "max": 6703.02 + }, + "stitch": { + "min": 6215.24, + "median": 6274.78, + "max": 6723.72 + } + }, + { + "name": "Clean Build - 100 Fixtures", + "none": { + "min": 5320.35, + "median": 5456.24, + "max": 5698.95 + }, + "koin": { + "min": 5428.55, + "median": 5535.77, + "max": 5745.15 + }, + "dagger": { + "min": 6355.27, + "median": 6620.33, + "max": 6955.57 + }, + "stitch": { + "min": 6166.71, + "median": 6551.63, + "max": 6857.97 + } + }, + { + "name": "Clean Build - 200 Fixtures", + "none": { + "min": 5399.86, + "median": 5803.77, + "max": 6281.89 + }, + "koin": { + "min": 5527.48, + "median": 5822.87, + "max": 6182.41 + }, + "dagger": { + "min": 7190.20, + "median": 7557.80, + "max": 8342.86 + }, + "stitch": { + "min": 6844.27, + "median": 7134.00, + "max": 7510.99 + } + } + ] + } +} diff --git a/docs/benchmarks/injection-performance/injection-performance-10-fixtures.json b/docs/benchmarks/injection-performance/injection-performance-10-fixtures.json index a58a68f..5f2d88a 100644 --- a/docs/benchmarks/injection-performance/injection-performance-10-fixtures.json +++ b/docs/benchmarks/injection-performance/injection-performance-10-fixtures.json @@ -24,1162 +24,1162 @@ }, "benchmarks": [ { - "name": "stitchPrecompiledFirstInject", + "name": "daggerFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2122476249, + "totalRunTimeNs": 2812880676, "metrics": { "timeNs": { - "minimum": 314.94581385465364, - "maximum": 994.0512820512821, - "median": 351.786053265335, - "coefficientOfVariation": 0.220640131409128, + "minimum": 124.82164376142441, + "maximum": 351.8904271884097, + "median": 212.87448378579649, + "coefficientOfVariation": 0.20212774249223794, "runs": [ - 994.0512820512821, - 465.8386457005241, - 399.24040232327525, - 382.14520470321577, - 357.54951126221846, - 370.01699957501063, - 334.84055815271284, - 356.4528261793455, - 349.94666383340416, - 423.0861311800538, - 345.0123246918827, - 426.9243518912027, - 348.38156962742596, - 358.4321433630826, - 357.34296642583934, - 461.2651933701657, - 339.47414647967133, - 351.5630400906644, - 352.41868536619916, - 575.5410114747132, - 349.5509987250319, - 350.3314917127072, - 355.02642017282903, - 352.2496812579686, - 484.03746989658595, - 343.0954809463097, - 371.481654625301, - 408.0507153987817, - 320.17814137979883, - 341.6217594560136, - 354.840062331775, - 350.4542428105964, - 465.8028757614393, - 322.31095055956933, - 344.41401048307125, - 424.9489304434056, - 320.7379232185862, - 326.15370449072105, - 346.2047740473155, - 360.49277518062047, - 466.3215044623884, - 321.99298767530814, - 342.31257968550784, - 354.47605893186005, - 410.31399631675873, - 323.7672474854795, - 347.43943901402463, - 350.7385607026491, - 469.55170704065733, - 324.67389148604616, - 348.12855928601783, - 352.00906644000565, - 429.5993766822496, - 315.9611134721632, - 349.0571610709732, - 349.1898994191812, - 383.13620909477265, - 451.78630117580394, - 344.7109363932568, - 428.95459696840913, - 320.36166595835107, - 337.1118430372574, - 351.01154554469474, - 567.6850120413657, - 335.20045332200027, - 333.89814421306136, - 348.759243518912, - 466.70980308825614, - 330.0468904944043, - 348.2331066723332, - 359.42668933276667, - 494.14201728290124, - 323.50247910468903, - 354.8093214336308, - 482.2634934126647, - 320.49114605468196, - 335.75414364640886, - 350.4031024224394, - 502.9167729140105, - 326.21221136138263, - 359.03817821221133, - 355.20696982575436, - 381.46706332341694, - 440.7721348632951, - 332.8492704349058, - 350.9930585068707, - 467.739198186712, - 314.94581385465364, - 348.4398640033999, - 353.9742881427964, - 350.130400906644, - 497.2550644567219, - 321.49114605468196, - 348.78006799830007, - 371.8046465505029, - 410.4212353024508, - 330.11722623601077, - 355.83404164895876, - 350.252727015158, - 487.58946026349344 + 283.2481213188004, + 124.82164376142441, + 351.8904271884097, + 254.24771511745988, + 287.0991808272967, + 206.07656895267755, + 249.56465371335725, + 175.94841242976102, + 226.55033511610588, + 179.3051587570239, + 183.5573082391172, + 253.49827364430303, + 154.36351634960394, + 215.85654322659263, + 181.3757700900413, + 185.15723376887144, + 235.21785931893575, + 188.85295511475186, + 279.8153476406472, + 147.89828041432537, + 183.22300453591498, + 267.36392255094444, + 299.4799607338704, + 235.1985647552637, + 188.10209193690338, + 244.72875905490488, + 185.33278044817547, + 231.30427865411957, + 150.79056935887888, + 157.7142373569833, + 232.27882337011712, + 181.56478911380407, + 254.64494617832239, + 172.54776250761628, + 262.92708685938663, + 171.2295376074741, + 255.49790129307428, + 266.0607609505111, + 184.52799404238033, + 225.12013404644236, + 230.63018752961884, + 184.4489540315483, + 209.89242434500034, + 173.6777469365649, + 216.24771511745988, + 201.00040620134047, + 188.7926680658046, + 216.33521765621828, + 177.22733735021325, + 305.4968857897231, + 226.02051316769345, + 175.702322117663, + 235.74856137025253, + 183.21653916457925, + 216.81737864734953, + 221.8051926071356, + 181.0257260848961, + 186.73989574165594, + 218.35515537201272, + 201.28836910161803, + 277.5839482770293, + 183.94042380339855, + 233.21403425631306, + 192.99529483447296, + 221.99322997765893, + 186.75705774829058, + 245.22043192742535, + 179.93030261999866, + 246.394760002708, + 186.50355426172905, + 233.36798456434906, + 181.9723444587367, + 231.0755195992147, + 184.37373908333896, + 238.42536050368966, + 185.80221379730554, + 344.7197210750796, + 224.18742806851262, + 183.67798388734684, + 199.69473969264098, + 167.3965879087401, + 240.1190846929795, + 197.84381558459143, + 237.49322997765893, + 184.17192471735157, + 193.28332543497393, + 223.1204386974477, + 166.25370658723173, + 320.39520005416017, + 201.7092952406743, + 164.90525353733668, + 299.99204522374924, + 231.19914020716269, + 182.45376074741046, + 308.44499356847876, + 209.8846726694198, + 231.50588991943673, + 266.56380746056465, + 185.629713628055, + 227.1046306952813 ] }, "allocationCount": { - "minimum": 10.000141663125088, - "maximum": 10.000141663125088, - "median": 10.000141663125088, - "coefficientOfVariation": 0.0, + "minimum": 10.000067700223411, + "maximum": 10.000101550335117, + "median": 10.000067700223411, + "coefficientOfVariation": 1.5138117430024936E-6, "runs": [ - 10.000141663125088, - 10.000141663125088, - 10.000141663125088, - 10.000141663125088, - 10.000141663125088 + 10.000101550335117, + 10.000067700223411, + 10.000067700223411, + 10.000067700223411, + 10.000067700223411 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 14118, + "repeatIterations": 29542, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject_2026-04-20-13-11-46.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject_2026-04-23-12-56-06.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject-methodTracing-2026-04-20-13-11-46.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject-methodTracing-2026-04-23-12-56-06.trace" } ] }, { - "name": "daggerFirstInject", + "name": "daggerSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2022878905, + "totalRunTimeNs": 2420571718, "metrics": { "timeNs": { - "minimum": 307.0928950307091, - "maximum": 1100.2843383584589, - "median": 336.4765145170296, - "coefficientOfVariation": 0.3387907601415016, + "minimum": 308.1000494804552, + "maximum": 969.6094012864918, + "median": 429.67214250371103, + "coefficientOfVariation": 0.31015329956615484, "runs": [ - 1100.2843383584589, - 736.2084729201563, - 714.2187325516471, - 691.4344639865997, - 621.7181742043551, - 338.92329704075934, - 501.12102177554436, - 335.7297599106644, - 337.22326912339474, - 321.23883305415967, - 525.2180346175321, - 318.18955890563933, - 309.9993718592965, - 317.2042853154662, - 635.3084170854271, - 318.27352037967614, - 492.8890982691234, - 310.58626465661644, - 311.1566164154104, - 464.7710078168621, - 310.18348687883866, - 310.44877163595754, - 316.34889726409824, - 520.9710357342267, - 315.0462032384143, - 309.13518983807927, - 315.00083752093803, - 759.9548436627582, - 478.61383305415967, - 350.9572864321608, - 496.7366694584031, - 457.6105527638191, - 307.4318118369626, - 601.0248464544947, - 312.8605527638191, - 312.9532384142937, - 525.7832216638749, - 313.8534338358459, - 314.32488833054157, - 314.05290340591847, - 587.8902847571189, - 526.6885120044668, - 310.2775683975433, - 598.8858179787828, - 307.250697934115, - 313.9004745951982, - 710.7097292015634, - 410.2630513679509, - 460.34792015633724, - 457.5158431044109, - 313.26214405360133, - 309.6862786152987, - 359.2027498604132, - 614.2042155220547, - 427.62444165270796, - 313.5959659408152, - 501.8116973757677, - 311.50921273031827, - 310.76116694584033, - 515.8958682300391, - 503.00607202680067, - 308.32035175879395, - 312.4996510329425, - 520.214824120603, - 405.1594081518705, - 461.63735343383587, - 541.0063512004467, - 313.0241485203797, - 316.52938302624233, - 309.47982970407594, - 479.0572305974316, - 427.5650474595198, - 459.76256281407035, - 311.56560580681185, - 578.283780011167, - 311.1928391959799, - 312.23262144053604, - 531.8983109994416, - 316.81190675600226, - 313.25837520938023, - 370.8423366834171, - 476.4045924064768, - 316.87269681742043, - 314.4077331099944, - 537.8870742601898, - 453.54320212171973, - 314.39419318816306, - 603.9768983807928, - 313.58375209380233, - 310.8990787269682, - 549.3133724176438, - 313.0974316024567, - 309.89112227805697, - 607.5213567839196, - 312.06190675600226, - 312.8250977107761, - 307.0928950307091, - 575.8439419318817, - 310.2562814070352, - 308.7620742601898 + 969.6094012864918, + 720.1273626917367, + 835.3058386937159, + 363.76759030183075, + 421.3024245423058, + 332.1213755566551, + 323.5515586343394, + 509.8820880752103, + 313.32038594755073, + 313.1478476001979, + 506.15546759030184, + 310.76239485403266, + 557.6050964868876, + 317.3473033151905, + 389.4622958931222, + 466.6280059376546, + 631.683374567046, + 311.9439386442355, + 311.4056902523503, + 545.9152399802078, + 457.2308758040574, + 575.9999505195448, + 312.52929242949034, + 309.4798614547254, + 534.2682335477487, + 314.09198416625435, + 523.0406234537357, + 311.8429985155863, + 311.6453240969817, + 518.887184562098, + 309.91039089559627, + 570.5144482929243, + 314.6752597723899, + 315.105393369619, + 537.9598713508165, + 468.7426026719446, + 562.2826323602177, + 311.61464621474516, + 313.07115289460666, + 524.5711528946066, + 456.56818406729343, + 489.168085106383, + 312.80346363186544, + 314.54542305789215, + 485.4586838198911, + 313.6794161306284, + 504.418208807521, + 311.0567046016823, + 312.63839683325085, + 431.54176150420585, + 316.01979218208805, + 420.06749134092036, + 519.6452251360713, + 459.2402770905492, + 427.8025235032162, + 478.5704601682335, + 446.96996536368135, + 547.4876793666501, + 310.24131618010887, + 310.41791192478973, + 574.6075210291934, + 313.36966848095, + 603.91687283523, + 310.31637803067787, + 310.8969816922316, + 581.8451261751608, + 313.074616526472, + 602.840227610094, + 471.08767936665015, + 310.4877783275606, + 574.9262246412667, + 312.44666006927264, + 627.3757545769421, + 312.02043542800595, + 310.7846115784265, + 562.729886194953, + 308.1000494804552, + 592.5923800098961, + 544.0098466105889, + 312.8654131618011, + 560.1652647204354, + 454.9519544779812, + 599.5717466600693, + 313.4481939633845, + 310.17704106877784, + 583.1733795150915, + 309.01994062345375, + 612.890103908956, + 526.1337951509154, + 484.14745175655617, + 383.6782285997031, + 311.08911429985153, + 701.6610588817417, + 311.29015338941116, + 503.08881741712025, + 310.5703117268679, + 486.43399307273626, + 313.3254329539832, + 313.1919346857991, + 623.2082632360218 ] }, "allocationCount": { - "minimum": 10.000139586823003, - "maximum": 10.000139586823003, - "median": 10.000139586823003, + "minimum": 10.00009896091044, + "maximum": 10.00009896091044, + "median": 10.00009896091044, "coefficientOfVariation": 0.0, "runs": [ - 10.000139586823003, - 10.000139586823003, - 10.000139586823003, - 10.000139586823003, - 10.000139586823003 + 10.00009896091044, + 10.00009896091044, + 10.00009896091044, + 10.00009896091044, + 10.00009896091044 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 14328, + "repeatIterations": 20210, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject_2026-04-20-13-11-48.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject_2026-04-23-12-56-08.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject-methodTracing-2026-04-20-13-11-48.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject-methodTracing-2026-04-23-12-56-08.trace" } ] }, { - "name": "stitchRuntimeFirstInject", + "name": "stitchPrecompiledSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2315075832, + "totalRunTimeNs": 2327767603, "metrics": { "timeNs": { - "minimum": 3781.4232442510875, - "maximum": 12146.579241765072, - "median": 4580.397141081417, - "coefficientOfVariation": 0.20179952273362414, + "minimum": 351.26301399825024, + "maximum": 700.0725612423447, + "median": 363.41385061242346, + "coefficientOfVariation": 0.1626360210992963, "runs": [ - 12146.579241765072, - 6129.36047234307, - 6403.8551895587325, - 6275.904909881914, - 4452.233685518956, - 4630.051584835302, - 5029.383467992542, - 5194.459912989434, - 4310.468614045992, - 4950.684275947794, - 5295.58359229335, - 4444.709757613425, - 5641.1243008079555, - 4337.80546923555, - 5302.658172778123, - 4426.505904288378, - 4463.1298943443135, - 5207.432566811684, - 4485.110006215041, - 5392.86140459913, - 4635.671224362958, - 4478.977625854568, - 6758.891236793039, - 4879.736482287135, - 4927.017402113113, - 5335.696084524549, - 5073.029832193909, - 4605.231821006837, - 4856.157240522063, - 4930.935985083903, - 5371.310130515848, - 4344.146674953387, - 4443.05593536358, - 5684.331261653201, - 4529.912367930391, - 5886.827843380982, - 4399.9204474829085, - 4363.891858297079, - 5443.441267868241, - 4555.562461155998, - 4488.354878806712, - 4798.83343691734, - 4322.022995649471, - 4300.354878806712, - 5525.212554381604, - 4146.093225605967, - 4353.132380360473, - 4778.216283405842, - 4436.1615910503415, - 4299.354878806712, - 6327.763206960845, - 4344.526413921691, - 5343.926041019266, - 4283.956494717216, - 4331.105655686762, - 4229.226848974518, - 5063.61280298322, - 4284.00124300808, - 4350.255438160348, - 6679.397762585457, - 5002.427594779366, - 4254.201367308888, - 5709.395898073338, - 4309.570540708514, - 6372.3890615289, - 4476.152268489745, - 4411.096954630205, - 5626.839651957738, - 4251.050341827222, - 6072.457426973276, - 4463.1559975139835, - 5296.6215040397765, - 4182.434431323803, - 4647.986326911125, - 4072.758856432567, - 4267.841516469857, - 4399.022995649471, - 4337.22249844624, - 4868.36233685519, - 4854.646985705407, - 4316.098819142325, - 4899.6109384711, - 4198.036047234307, - 5707.668738346799, - 4837.203231821007, - 3897.350528278434, - 5955.284648850217, - 3920.8135487880672, - 4178.1317588564325, - 5078.573026724674, - 4433.91609695463, - 4720.771286513363, - 4760.007458048477, - 3781.4232442510875, - 4149.960223741455, - 4778.977004350529, - 4450.315724052206, - 4116.060285891858, - 4256.565568676197, - 4396.752019888129 + 700.0725612423447, + 386.3332239720035, + 361.2017716535433, + 488.415791776028, + 363.39195100612426, + 415.7853237095363, + 359.5727799650044, + 355.8650481189851, + 562.7292760279965, + 387.64484908136484, + 418.71325459317586, + 353.957895888014, + 356.85990813648294, + 392.69706911636047, + 539.2550306211724, + 444.43389107611546, + 358.41978346456693, + 356.6759076990376, + 358.2735673665792, + 537.7268700787401, + 370.4400699912511, + 463.474354768154, + 363.34798775153104, + 351.26301399825024, + 431.70538057742783, + 354.5663276465442, + 352.27504374453196, + 475.07037401574803, + 386.7028652668416, + 352.80746937882765, + 357.1830161854768, + 460.75038276465443, + 355.7857064741907, + 357.1553477690289, + 445.036198600175, + 355.30555555555554, + 357.70527121609797, + 471.79735345581804, + 378.8757108486439, + 356.9048009623797, + 433.9186898512686, + 360.1470363079615, + 354.3597440944882, + 368.2917213473316, + 470.30353237095363, + 368.3191710411199, + 357.34503499562555, + 549.4708552055993, + 362.7580927384077, + 363.43575021872266, + 484.1129702537183, + 360.52121609798775, + 362.1198600174978, + 436.2115048118985, + 359.2068569553806, + 357.3801399825022, + 488.91901793525807, + 395.3359033245844, + 357.1042213473316, + 529.0277777777778, + 403.80954724409446, + 356.50628827646545, + 454.00497594050745, + 376.0415573053368, + 351.60722878390203, + 470.21746500437445, + 360.93771872265967, + 354.1766185476815, + 357.34919072615924, + 483.43044619422574, + 353.2337598425197, + 451.8131014873141, + 377.5630468066492, + 354.16234689413824, + 357.90436351706035, + 481.4100503062117, + 366.82884951881016, + 359.5288167104112, + 439.3044072615923, + 356.3871391076116, + 359.4528652668416, + 377.6375765529309, + 488.31424978127734, + 358.08852799650043, + 358.77176290463694, + 558.1755249343832, + 358.9041447944007, + 355.1780949256343, + 485.27176290463694, + 360.2951115485564, + 448.650645231846, + 367.1628390201225, + 353.7534995625547, + 357.6366469816273, + 467.3307086614173, + 371.6900699912511, + 357.5411745406824, + 445.19116360454944, + 359.42180664916884, + 355.86198600174976 ] }, "allocationCount": { - "minimum": 138.99937849596023, - "maximum": 139.00124300807954, - "median": 139.00124300807954, - "coefficientOfVariation": 5.998776612670356E-6, + "minimum": 10.000109361329834, + "maximum": 10.000109361329834, + "median": 10.000109361329834, + "coefficientOfVariation": 0.0, "runs": [ - 139.00124300807954, - 138.99937849596023, - 139.00124300807954, - 139.00124300807954, - 139.00124300807954 + 10.000109361329834, + 10.000109361329834, + 10.000109361329834, + 10.000109361329834, + 10.000109361329834 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 1609, + "repeatIterations": 18288, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject_2026-04-20-13-11-50.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject_2026-04-23-12-56-11.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject-methodTracing-2026-04-20-13-11-50.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject-methodTracing-2026-04-23-12-56-11.trace" } ] }, { - "name": "koinFirstInject", + "name": "koinFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 5737822290, + "totalRunTimeNs": 4279469529, "metrics": { "timeNs": { - "minimum": 20139.753588516745, - "maximum": 35195.282296650716, - "median": 23779.897727272728, - "coefficientOfVariation": 0.08900035490427104, + "minimum": 12979.905451037144, + "maximum": 21332.986493005305, + "median": 14885.80849011095, + "coefficientOfVariation": 0.07110292966274562, "runs": [ - 35195.282296650716, - 29048.572966507178, - 24217.515550239234, - 24198.376794258373, - 24777.107655502394, - 23463.12081339713, - 24635.306220095692, - 23568.983253588518, - 21898.112440191388, - 22507.412679425837, - 21724.052631578947, - 24102.116028708133, - 22382.635167464116, - 22890.613636363636, - 23909.825358851675, - 23739.276315789473, - 27700.30980861244, - 23090.557416267944, - 22730.035885167465, - 23244.16985645933, - 22979.386363636364, - 22319.59928229665, - 24416.633971291867, - 21837.555023923444, - 23282.32057416268, - 27007.264354066985, - 23495.692583732056, - 22204.234449760766, - 23820.519138755983, - 25431.02751196172, - 25435.12918660287, - 27326.991626794257, - 21723.92822966507, - 22349.97248803828, - 25980.035885167465, - 24916.319377990432, - 24294.315789473683, - 23860.28947368421, - 25173.242822966506, - 21222.655502392343, - 25723.364832535884, - 24390.58851674641, - 24012.72966507177, - 22802.08014354067, - 28233.151913875598, - 24543.91746411483, - 24083.123205741627, - 24288.53827751196, - 21854.26196172249, - 22008.355263157893, - 24172.68899521531, - 22360.245215311006, - 21565.48923444976, - 22837.77751196172, - 25975.891148325358, - 26419.903110047846, - 23214.105263157893, - 22831.046650717704, - 26387.452153110047, - 24157.953349282296, - 22969.13277511962, - 24797.974880382775, - 25924.08851674641, - 23974.855263157893, - 22396.480861244017, - 22340.16028708134, - 25294.87799043062, - 25574.28947368421, - 28571.397129186604, - 21927.556220095692, - 23038.694976076556, - 23823.86124401914, - 23912.226076555024, - 22115.77870813397, - 22521.49880382775, - 21982.99880382775, - 21523.269138755983, - 22431.063397129186, - 23150.283492822968, - 22060.92224880383, - 21239.907894736843, - 24725.21052631579, - 20139.753588516745, - 25880.437799043062, - 23109.607655502394, - 20814.654306220094, - 21110.192583732056, - 24053.522727272728, - 21930.346889952154, - 21845.394736842107, - 20643.819377990432, - 24136.623205741627, - 21763.995215311006, - 22756.812200956938, - 26524.24880382775, - 24479.91866028708, - 24475.483253588518, - 24133.57057416268, - 24151.504784688994, - 25497.025119617225 + 21332.986493005305, + 16737.894838398457, + 15766.325615050651, + 15225.49300530632, + 15602.538350217077, + 14816.08779546551, + 15380.009647853352, + 14688.50506512301, + 16336.353593825374, + 15864.864447660395, + 15938.65557163531, + 15170.747226242162, + 16593.353111432705, + 14319.499758803666, + 14771.591895803183, + 14887.014471780029, + 14510.296189097926, + 15636.933912204535, + 14574.413892908828, + 15750.874095513747, + 13969.664254703328, + 14687.424505547515, + 15088.890979257116, + 15477.643994211288, + 15279.787747226243, + 14477.533526290401, + 15606.332368547997, + 15207.654606849976, + 14236.010612638687, + 15154.491075735648, + 15185.997588036662, + 15315.339122045345, + 14221.589001447179, + 14411.983116256633, + 14376.884225759768, + 15380.286058851905, + 14032.074288470816, + 15989.281717317897, + 14599.513748191028, + 14936.208393632416, + 13183.314037626627, + 14523.310660877954, + 15761.628075253257, + 15323.15291847564, + 14900.757356488182, + 15367.598166907863, + 14106.694163048722, + 16372.457308248915, + 15483.29715388326, + 13968.00627110468, + 16555.967679691268, + 14655.893391220454, + 15149.24023154848, + 14487.507959479017, + 13980.870236372408, + 14405.777616980222, + 15840.744814278823, + 14884.602508441872, + 14540.219488663772, + 12979.905451037144, + 15744.970091654606, + 15672.083936324168, + 14601.021225277376, + 14998.165943077665, + 15385.059816690786, + 14211.815726000965, + 13854.242161119151, + 14303.796912686927, + 13907.280270139894, + 14893.44621321756, + 14703.780511336228, + 14590.971056439943, + 14586.624216111915, + 13949.816208393633, + 13002.241196333816, + 14438.59044862518, + 15517.969126869271, + 14755.462132175591, + 15917.877472262422, + 14901.18523878437, + 14590.54365653642, + 16287.461167390256, + 14445.499276411, + 13923.711529184757, + 16237.915098890497, + 14874.829232995658, + 14639.386396526772, + 13009.602508441872, + 14519.466473709599, + 15041.707187650747, + 15779.34008683068, + 15194.339122045345, + 15046.103714423542, + 15307.072841292813, + 17196.444283646888, + 13692.966714905933, + 13512.296189097926, + 13834.066570188133, + 13094.800289435601, + 14457.333333333334 ] }, "allocationCount": { - "minimum": 387.9988038277512, - "maximum": 388.00598086124404, - "median": 388.0035885167464, - "coefficientOfVariation": 7.97988169414609E-6, + "minimum": 249.9980704293295, + "maximum": 250.0014471780029, + "median": 250.00048239266764, + "coefficientOfVariation": 6.486348012210073E-6, "runs": [ - 388.0047846889952, - 388.0035885167464, - 387.9988038277512, - 388.0, - 388.00598086124404 + 250.00096478533527, + 250.00048239266764, + 250.0014471780029, + 249.9980704293295, + 249.9980704293295 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 836, + "repeatIterations": 2073, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject_2026-04-20-13-11-56.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject_2026-04-23-12-56-15.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject-methodTracing-2026-04-20-13-11-55.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject-methodTracing-2026-04-23-12-56-15.trace" } ] }, { - "name": "stitchRuntimeRepeatedInject", + "name": "stitchRuntimeSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2625359635, + "totalRunTimeNs": 2373446510, "metrics": { "timeNs": { - "minimum": 843.6268511182888, - "maximum": 1797.7335608507526, - "median": 885.2468462429155, - "coefficientOfVariation": 0.11465004122770941, + "minimum": 655.6548716533259, + "maximum": 1612.3838255589292, + "median": 736.8217499309965, + "coefficientOfVariation": 0.13499902132035935, "runs": [ - 1797.7335608507526, - 1042.2189652020234, - 869.070205375099, - 905.4545676153331, - 887.4417088183314, - 890.247608019989, - 878.5796818818941, - 880.4397586690231, - 875.8626973002621, - 882.6298372844171, - 1028.2657687854226, - 848.7942592479736, - 845.743921018953, - 844.7917606191724, - 898.404960692303, - 885.902309708087, - 883.1090864769334, - 884.2454750441831, - 878.8145529892132, - 991.6496434883296, - 854.7360594795539, - 854.6408678164422, - 845.8233286611006, - 878.4273874093485, - 881.7252117740264, - 891.5489670302883, - 884.5913827777439, - 875.1675909561826, - 951.0659394234871, - 861.2366384301298, - 846.7278932293253, - 851.8444755926625, - 864.9629471631422, - 884.2200621610092, - 878.6558595892498, - 887.3814370162715, - 888.1622280455847, - 886.1530257785362, - 990.1419952465111, - 897.1924553598635, - 845.3186056432446, - 845.8074227558047, - 844.0553354866232, - 904.0548479492961, - 894.3961240782497, - 894.2310317508684, - 890.1841672253032, - 887.9686147845695, - 1051.4682186604912, - 850.8541653970382, - 846.4168444146505, - 844.5345846791395, - 899.0651471753306, - 898.3953927722591, - 893.4502407215552, - 883.5534767505637, - 896.0498506916936, - 976.8203424949722, - 888.7494667560485, - 843.6268511182888, - 844.0394905234932, - 846.1153025778536, - 906.9527088792736, - 894.5072216466573, - 897.6178316777379, - 890.5871777682979, - 889.4033152538241, - 1060.0825766347737, - 861.477786580535, - 844.8552014138583, - 850.060698397221, - 873.0504601133524, - 891.8568468523372, - 895.2531537570845, - 889.0414406728015, - 882.9948808580657, - 1015.8614175147785, - 888.3558413066, - 844.4139801328539, - 843.7061978182704, - 845.9725150831861, - 886.460966542751, - 890.4951550978121, - 894.9547809129136, - 887.1592418794564, - 888.4891827655555, - 1050.5858370406484, - 875.0088975562192, - 846.7882259735511, - 851.7746968127248, - 864.0329697117436, - 899.3095862026936, - 899.7570845267841, - 890.9585593271985, - 892.0441221281004, - 981.6417819489304, - 883.2868547748187, - 843.7950514961302, - 844.5092327381315, - 847.099274788226 + 1612.3838255589292, + 771.6699972398565, + 678.2477504830251, + 694.0409605299476, + 777.4806513938724, + 736.6736958321833, + 655.6548716533259, + 683.1527463428098, + 773.0529395528567, + 736.397681479437, + 683.2361578802098, + 656.6467568313552, + 816.2434446591222, + 740.7334253381176, + 689.9323764835772, + 656.6812586254485, + 679.2166712669059, + 821.2951145459564, + 729.0717637317141, + 719.687330941209, + 713.1204526635385, + 900.7095776980403, + 754.9049958597847, + 721.7286778912503, + 715.0324040850124, + 749.3013524703284, + 807.9745514766768, + 722.1369583218327, + 722.4646977642838, + 727.6256141319349, + 925.0103781396633, + 743.8787744962738, + 726.7947005244273, + 724.0546508418438, + 853.0396356610544, + 740.8886558101021, + 719.4630416781673, + 715.5988407397184, + 825.2713773116202, + 736.8778360474745, + 716.9903947005245, + 722.2260557548992, + 754.8992547612476, + 843.9224951697488, + 751.7682031465636, + 719.1410433342534, + 727.5335909467292, + 829.2103229367927, + 740.3854816450455, + 730.8715981231024, + 737.7720121446315, + 757.242506210323, + 832.6806513938725, + 744.6148495721777, + 739.1808446039194, + 728.0223571625725, + 889.9651669886834, + 776.6670162848468, + 731.0671266905879, + 725.1443555064864, + 738.9277946453216, + 832.683521943141, + 746.040905327077, + 728.695169748827, + 731.0872757383383, + 909.6311344189897, + 760.8508418437759, + 727.8469776428374, + 733.8560309136075, + 828.0085564449352, + 728.327132210875, + 735.1642285398841, + 730.8342257797406, + 749.4134695004141, + 919.9788573005796, + 744.3302235716258, + 720.9437482749103, + 724.1782500690036, + 829.3425890146287, + 739.9456251725089, + 730.1672646977643, + 748.191553960806, + 921.0972674579078, + 789.8840739718465, + 728.5169196798233, + 726.9211703008557, + 835.1734474192658, + 742.9616340049682, + 736.7656638145183, + 723.8533811758211, + 820.4497929892354, + 735.3885178029258, + 727.1195694176097, + 723.913773116202, + 758.4730333977367, + 753.9216671266906, + 824.434777808446, + 743.7896770632073, + 729.8941208942865, + 733.3787468948385 ] }, "allocationCount": { - "minimum": 10.000121884331769, - "maximum": 10.000121884331769, - "median": 10.000121884331769, + "minimum": 20.000110405741097, + "maximum": 20.000110405741097, + "median": 20.000110405741097, "coefficientOfVariation": 0.0, "runs": [ - 10.000121884331769, - 10.000121884331769, - 10.000121884331769, - 10.000121884331769, - 10.000121884331769 + 20.000110405741097, + 20.000110405741097, + 20.000110405741097, + 20.000110405741097, + 20.000110405741097 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 16409, + "repeatIterations": 18115, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject_2026-04-20-13-11-59.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject_2026-04-23-12-56-17.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject-methodTracing-2026-04-20-13-11-58.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject-methodTracing-2026-04-23-12-56-17.trace" } ] }, { - "name": "koinRepeatedInject", + "name": "koinSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 4009785311, + "totalRunTimeNs": 4665044165, "metrics": { "timeNs": { - "minimum": 5963.934819075006, - "maximum": 9869.81044811886, - "median": 6652.282171099929, - "coefficientOfVariation": 0.0691668512463065, + "minimum": 6368.3676209279365, + "maximum": 10768.128923988153, + "median": 6934.353405725567, + "coefficientOfVariation": 0.06637220094771956, "runs": [ - 9869.81044811886, - 8181.401869158878, - 6662.28588545411, - 6383.347232207046, - 6293.18427989456, - 6711.124131320393, - 6540.558351306015, - 6738.157919961658, - 6677.675053918045, - 6696.6712197459865, - 6650.90294751977, - 6976.321111909897, - 6709.2393961179005, - 6410.581116702612, - 6816.189312245387, - 6340.811885933381, - 6582.544692068057, - 6490.309849029475, - 6254.405703330937, - 7030.975557153127, - 6310.807572489815, - 6449.758926431824, - 6412.2782171099925, - 6796.244668104481, - 6782.053678408819, - 7209.5789599808295, - 6046.284687275342, - 6815.003834172058, - 6713.994728013419, - 6518.154804696861, - 6718.288042175893, - 6193.747903187155, - 6627.825545171339, - 6751.350347471843, - 6703.273664030673, - 6463.088665228852, - 6189.080277977474, - 6493.242751018452, - 6870.569374550683, - 6739.293793433981, - 6049.654684878984, - 6599.381260484064, - 6701.526240115025, - 6908.08722741433, - 6353.055835130602, - 6853.944644140905, - 6455.737359213995, - 6591.568416007668, - 6964.089623771867, - 6079.646297627606, - 6751.1382698298585, - 6899.512580877067, - 6305.802540138989, - 6447.200335490055, - 6367.88329738797, - 6253.856697819315, - 6600.61706206566, - 6858.999281092739, - 6818.8854541097535, - 6861.807332854062, - 6846.356098729931, - 6299.562185478073, - 6840.851905104241, - 6506.422717469446, - 6785.685597891205, - 6644.987059669303, - 6500.0699736400675, - 6804.943925233645, - 6007.9803498682, - 6795.171339563863, - 6477.304577042894, - 7223.233165588305, - 6653.661394680086, - 6518.878983944404, - 7054.56458183561, - 6644.662592858855, - 6819.658998322549, - 6055.320872274143, - 6555.036184998802, - 7172.47280134196, - 6830.692307692308, - 6026.065420560748, - 6250.374311047208, - 6804.669302659957, - 6677.200575125808, - 5963.934819075006, - 6491.133477114786, - 6829.618979151689, - 6557.045770428948, - 6579.636472561706, - 6813.780493649652, - 5969.251857177091, - 6679.609393721543, - 6839.179487179487, - 6417.869638150012, - 6820.632638389648, - 5970.362568895279, - 6884.560508027797, - 6562.549964054637, - 6680.058950395399 + 10768.128923988153, + 7220.744916090819, + 7261.825468904245, + 7141.648173741362, + 6825.631391905232, + 7428.348272458045, + 7297.887857847976, + 7086.222902270484, + 7095.909378084896, + 6835.873247778874, + 6786.7514313919055, + 6844.76801579467, + 7523.07502467917, + 7025.131490621915, + 7034.591905231984, + 7410.383810463968, + 6773.990128331688, + 7411.63830207305, + 7114.501085883514, + 6924.625666337611, + 6690.924383020731, + 6504.853504442251, + 7100.516090819348, + 6975.567620927937, + 6713.063376110563, + 7003.845804540967, + 7288.5405725567625, + 6908.501875616979, + 7187.952418558736, + 6920.060019743337, + 6831.924580454097, + 6781.33228035538, + 7097.585587364265, + 7227.850345508391, + 6914.805528134255, + 7186.039684106614, + 6766.493978282329, + 6452.934846989141, + 6943.258440276407, + 7177.484304047384, + 6709.13543928924, + 7116.814807502468, + 7279.656071076012, + 7025.039091806515, + 6557.183810463968, + 6621.678578479763, + 6616.9690029615, + 7008.617176702863, + 6822.021915103653, + 7279.4197433366235, + 6727.089437314906, + 6656.45567620928, + 6782.504639684106, + 7128.527147087858, + 6641.380848963475, + 6586.891214215202, + 6730.904639684107, + 7165.401974333662, + 6742.503652517275, + 7468.287265547878, + 6621.935636722606, + 6783.1216189536035, + 6672.79526159921, + 6737.321224086871, + 7306.741559723593, + 6722.174136229023, + 6698.4821322803555, + 6788.972556762093, + 7269.126357354393, + 6695.829220138204, + 7107.632181638697, + 7090.449160908193, + 6368.3676209279365, + 7092.91707798618, + 6440.461599210266, + 7258.452714708786, + 6653.381046396841, + 7000.226061204344, + 6721.330898321817, + 7228.765646594275, + 7035.507206317868, + 6988.750444225074, + 6611.632181638697, + 6985.5524185587365, + 7017.861599210267, + 6610.542152023692, + 6925.448371174729, + 6892.01836130306, + 7016.483711747285, + 7490.909772951629, + 7350.135636722606, + 6759.8614017769005, + 6905.715301085884, + 6911.823297137216, + 7013.079960513327, + 7098.67561697927, + 6737.845409674235, + 7312.56169792695, + 6794.792694965449, + 6621.215992102665 ] }, "allocationCount": { - "minimum": 119.99976036424634, - "maximum": 120.00119817876828, - "median": 120.0004792715073, - "coefficientOfVariation": 4.236184741598742E-6, + "minimum": 120.00019743336624, + "maximum": 120.0009871668312, + "median": 120.00059230009872, + "coefficientOfVariation": 2.6014001742081103E-6, "runs": [ - 120.0004792715073, - 120.0004792715073, - 119.99976036424634, - 120.00119817876828, - 120.0004792715073 + 120.00039486673248, + 120.00019743336624, + 120.00078973346496, + 120.00059230009872, + 120.0009871668312 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 4173, + "repeatIterations": 5065, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject_2026-04-20-13-12-03.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject_2026-04-23-12-56-22.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject-methodTracing-2026-04-20-13-12-02.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject-methodTracing-2026-04-23-12-56-22.trace" } ] }, { - "name": "stitchPrecompiledRepeatedInject", + "name": "stitchPrecompiledFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1115225990, + "totalRunTimeNs": 3038627447, "metrics": { "timeNs": { - "minimum": 30.915444686528435, - "maximum": 252.08058948811475, - "median": 32.846458909642834, - "coefficientOfVariation": 0.6371087617798864, + "minimum": 152.385775, + "maximum": 286.292675, + "median": 205.4394625, + "coefficientOfVariation": 0.19113580096088512, "runs": [ - 252.08058948811475, - 110.17584273788832, - 42.97204337927489, - 37.21405664765356, - 36.556145805282874, - 35.724815784964136, - 34.66909838674141, - 34.600259492276436, - 34.449802932752334, - 34.456167837645964, - 35.02355014810644, - 34.42941075668927, - 34.51736884623858, - 35.53102891135646, - 35.76305417513281, - 34.45107591373106, - 36.066537736541896, - 30.984283580993417, - 30.934563881612767, - 32.16240299640138, - 30.926901515336972, - 30.943499228867292, - 31.556782295772233, - 30.926901515336972, - 32.11395627799946, - 31.916325981052168, - 32.11138583563857, - 30.9409287865064, - 31.889544419692037, - 32.1330754730838, - 30.943499228867292, - 32.5640284951896, - 30.915444686528435, - 31.660040637469706, - 32.47479742466156, - 32.70684716884134, - 31.458591397586233, - 32.43653455408945, - 33.31249234987393, - 31.547846948517712, - 32.85857670934417, - 30.943474748463856, - 32.14328380131705, - 31.912507038115987, - 32.67751964552376, - 31.461137359543685, - 32.01576537981346, - 32.67367622218414, - 31.46241034052241, - 31.866581801268087, - 31.47007270679821, - 31.461137359543685, - 31.934172195157775, - 31.47643761169184, - 32.69409287865064, - 31.589904281622562, - 31.47007270679821, - 31.464980782883302, - 31.467526744840754, - 33.148008519180394, - 32.67497368356631, - 32.65967343141815, - 32.79737570075155, - 32.68261156943866, - 32.685182011799554, - 33.285710788513796, - 31.47900805405273, - 32.701730764523, - 32.83434110994149, - 31.4522264926926, - 31.756934074273545, - 34.28529462165537, - 35.02864207202135, - 34.7506915713971, - 34.42811329530711, - 34.41920242845602, - 35.25559989228623, - 35.803863007662365, - 34.43065925726456, - 34.551812773874516, - 34.425567333349655, - 34.42429435237093, - 34.98531175793777, - 35.75159734632427, - 34.43065925726456, - 34.544150407598714, - 35.761805674557515, - 34.72266150946167, - 35.93774633405958, - 34.41281304315895, - 34.604053954809174, - 35.764327156111534, - 34.419177948052585, - 36.247570319958875, - 34.449778452348895, - 35.86633699723372, - 35.531004430953026, - 34.42684031432838, - 35.51700164018703, - 35.94665720091067 + 242.14965, + 205.811225, + 154.8649, + 244.9855, + 187.836825, + 245.916825, + 199.849525, + 212.672475, + 161.473475, + 210.171825, + 195.415525, + 157.933475, + 156.6041, + 220.506775, + 167.6646, + 234.59765, + 209.7279, + 232.5203, + 176.263675, + 164.68715, + 216.98675, + 286.292675, + 162.8362, + 224.841, + 171.661125, + 254.09415, + 206.0791, + 209.13885, + 158.95765, + 219.6018, + 155.050475, + 268.020975, + 152.654025, + 226.5573, + 246.570875, + 175.890175, + 217.80205, + 164.485, + 204.4871, + 156.77815, + 223.1627, + 154.8289, + 264.721825, + 231.527175, + 171.77025, + 236.22885, + 157.142425, + 222.86555, + 157.8735, + 278.168075, + 156.931825, + 229.132375, + 157.812625, + 265.881925, + 217.611075, + 157.7417, + 284.91535, + 157.7126, + 213.225325, + 195.3659, + 156.466325, + 217.53785, + 165.305825, + 265.304275, + 159.049275, + 218.7669, + 236.40955, + 197.045, + 220.8601, + 157.46855, + 245.447675, + 217.2592, + 162.60055, + 195.219825, + 214.2209, + 157.1356, + 197.628825, + 153.275925, + 239.522625, + 235.008325, + 182.439725, + 226.2233, + 154.849475, + 213.2127, + 156.062025, + 216.551025, + 205.0677, + 157.511575, + 154.492025, + 217.557275, + 152.385775, + 285.25085, + 155.657925, + 222.137325, + 153.918225, + 261.89725, + 171.2317, + 204.5466, + 216.251475, + 154.419125 ] }, "allocationCount": { - "minimum": 4.896080687409729E-5, - "maximum": 4.896080687409729E-5, - "median": 4.896080687409729E-5, + "minimum": 10.00005, + "maximum": 10.00005, + "median": 10.00005, "coefficientOfVariation": 0.0, "runs": [ - 4.896080687409729E-5, - 4.896080687409729E-5, - 4.896080687409729E-5, - 4.896080687409729E-5, - 4.896080687409729E-5 + 10.00005, + 10.00005, + 10.00005, + 10.00005, + 10.00005 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 40849, + "repeatIterations": 40000, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject_2026-04-20-13-12-04.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject_2026-04-23-12-56-25.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject-methodTracing-2026-04-20-13-12-04.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject-methodTracing-2026-04-23-12-56-25.trace" } ] }, { - "name": "daggerRepeatedInject", + "name": "stitchRuntimeFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1070571250, + "totalRunTimeNs": 1588163176, "metrics": { "timeNs": { - "minimum": 17.8078632781369, - "maximum": 101.92062339502347, - "median": 17.8655096077216, - "coefficientOfVariation": 0.4655356418252099, + "minimum": 1252.4392691713845, + "maximum": 5823.830674215132, + "median": 1328.051209469892, + "coefficientOfVariation": 0.3362571872261912, "runs": [ - 101.92062339502347, - 47.807084034357565, - 19.33167448862127, - 19.501372531656777, - 17.836447356769682, - 18.341007703887364, - 17.88532719383689, - 17.83368458337023, - 17.83368458337023, - 17.92593642079164, - 17.893633224121135, - 17.87519702470557, - 17.831842734437263, - 18.392668024439917, - 17.868750553440183, - 17.857664039670592, - 17.85860267422297, - 17.948074028159038, - 17.869653767820775, - 17.84937571947224, - 17.859523598689453, - 18.2349419994687, - 17.86597006995484, - 17.845692021606304, - 17.862286372088903, - 17.957300982909768, - 17.870592402373152, - 17.845674311520412, - 17.873355175772602, - 18.20634021075002, - 17.864110510935976, - 17.853980341804657, - 17.876117949172052, - 17.966510227574602, - 17.86873284335429, - 17.84385017267334, - 18.054139732577703, - 18.139927388647834, - 17.867829628973702, - 17.841069689187993, - 17.954520499424422, - 17.849358009386346, - 17.86873284335429, - 17.846595235986893, - 18.21370760648189, - 17.864128221021872, - 17.867811918887806, - 17.850296643938723, - 17.93976799787479, - 17.8078632781369, - 17.8899495262552, - 17.81062605153635, - 18.11594793234747, - 17.851217568405207, - 17.850296643938723, - 17.843832462587443, - 18.018152838041264, - 17.857664039670592, - 17.86597006995484, - 17.84477109713982, - 18.329017975737184, - 17.85027893385283, - 17.839210130169132, - 17.850296643938723, - 17.920393163906844, - 17.846595235986893, - 17.861347737536526, - 17.845674311520412, - 18.23400336491632, - 17.848437084919862, - 17.869653767820775, - 17.846595235986893, - 18.034764898609758, - 17.841990613654477, - 17.869653767820775, - 17.852138492871692, - 18.255220047817232, - 17.841069689187993, - 17.860444523155937, - 17.853059417338173, - 17.985885061542547, - 17.850296643938723, - 17.865049145488356, - 17.84014876472151, - 18.22663596918445, - 17.852138492871692, - 17.86597006995484, - 17.84477109713982, - 17.96558930310812, - 17.852120782785796, - 17.870574692287256, - 17.953599574957938, - 18.221092712299654, - 17.84937571947224, - 17.864128221021872, - 17.845674311520412, - 17.977596741344197, - 17.882582130523332, - 17.862286372088903, - 17.865049145488356 + 5823.830674215132, + 2253.92434379825, + 1834.5100360267627, + 1738.9747812660835, + 1651.2532166752444, + 1631.7254246011323, + 1630.8944930519815, + 1735.3962943901183, + 2272.741893978384, + 1568.330159547092, + 1523.725681935152, + 1532.6788471435923, + 1507.0123520329387, + 2046.6096242923315, + 1522.8142048378795, + 1566.1857951621205, + 1373.4130211013896, + 1338.0563561502831, + 1342.4526505404015, + 1749.2547606793619, + 1346.125064333505, + 1326.650540401441, + 1309.5620174987134, + 1306.358723623263, + 1309.1868244981986, + 1341.9565105506947, + 1321.5308800823468, + 1424.4909933093154, + 1728.158775090067, + 1316.7460113226969, + 1329.4518785383427, + 1307.1628924343797, + 1290.3558929490478, + 1310.8489449305198, + 1755.4333504889346, + 1290.838394235718, + 1282.0460627895009, + 1274.3530622748328, + 1260.092382913021, + 1283.172156459084, + 1284.0967575913535, + 1283.7750900669068, + 1974.8242408646422, + 1489.6556870818322, + 1283.3728769943386, + 1290.5568708183223, + 1277.9045290787442, + 1269.0854348944931, + 1302.8605249614, + 2028.9045290787442, + 1434.4629439011837, + 1252.5465774575398, + 1261.7408646423057, + 1258.5913535769428, + 1300.5954709212558, + 1351.6603190941842, + 1640.8795676788473, + 1288.2920741121977, + 1275.5054040144107, + 1260.2130725681934, + 1266.458826556871, + 1278.4675759135357, + 1384.4570252187339, + 1978.5903242408647, + 1459.6065362840968, + 1466.1338136901697, + 1252.814462171899, + 1285.7050952135871, + 1262.612197632527, + 1393.1688111168296, + 1925.5954709212558, + 1323.7689140504374, + 1252.4392691713845, + 1264.394750386001, + 1274.8489449305198, + 1294.9799279464746, + 2131.7043232115284, + 1503.621461657231, + 1392.3646423057128, + 1255.2537313432836, + 1262.4243437982502, + 1312.1356150283068, + 1263.2822954194544, + 1272.758106021616, + 1967.801080802882, + 1698.9004117344314, + 1580.540144107051, + 1289.109366958312, + 1294.993051981472, + 1916.0661348430262, + 1510.4302624806999, + 1791.9426145136388, + 1262.6387030365415, + 1273.3208955223881, + 2024.2135872362326, + 1259.100617601647, + 1277.100617601647, + 1789.1549150797734, + 1332.1322696860525, + 1262.5584148224395 ] }, "allocationCount": { - "minimum": 3.542017178783317E-5, - "maximum": 3.542017178783317E-5, - "median": 3.542017178783317E-5, - "coefficientOfVariation": 0.0, + "minimum": 44.999485331960884, + "maximum": 45.000514668039116, + "median": 45.000514668039116, + "coefficientOfVariation": 1.0229553991768792E-5, "runs": [ - 3.542017178783317E-5, - 3.542017178783317E-5, - 3.542017178783317E-5, - 3.542017178783317E-5, - 3.542017178783317E-5 + 45.000514668039116, + 45.000514668039116, + 45.000514668039116, + 45.000514668039116, + 44.999485331960884 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 56465, + "repeatIterations": 3886, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject_2026-04-20-13-12-05.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject_2026-04-23-12-56-27.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject-methodTracing-2026-04-20-13-12-05.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject-methodTracing-2026-04-23-12-56-27.trace" } ] } diff --git a/docs/benchmarks/injection-performance/injection-performance-100-fixtures.json b/docs/benchmarks/injection-performance/injection-performance-100-fixtures.json index d2a3920..9c59cf3 100644 --- a/docs/benchmarks/injection-performance/injection-performance-100-fixtures.json +++ b/docs/benchmarks/injection-performance/injection-performance-100-fixtures.json @@ -24,1162 +24,1162 @@ }, "benchmarks": [ { - "name": "stitchPrecompiledFirstInject", + "name": "daggerFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2287095572, + "totalRunTimeNs": 2413588385, "metrics": { "timeNs": { - "minimum": 3117.6877172653535, - "maximum": 20320.561413673233, - "median": 3561.7946118192353, - "coefficientOfVariation": 0.44013460104355934, + "minimum": 1149.0350419924703, + "maximum": 8140.526209093542, + "median": 1312.692586156965, + "coefficientOfVariation": 0.487424047632359, "runs": [ - 20320.561413673233, - 4694.095017381228, - 4108.1952491309385, - 4246.632676709154, - 4758.957126303592, - 3967.7462340672073, - 4069.8783314020857, - 4866.329084588644, - 4105.67033603708, - 5780.1292004635, - 4527.01506373117, - 4145.3174971031285, - 3992.816338354577, - 5073.937427578216, - 3964.543453070684, - 3964.5046349942063, - 5820.520857473928, - 3819.8487833140207, - 3747.0440324449596, - 4411.132676709154, - 3525.81865585168, - 3327.928736964079, - 5429.787369640788, - 3465.4183082271147, - 3338.8852838933954, - 3430.412514484357, - 4373.49594438007, - 3335.489571263036, - 3367.2931633835456, - 4448.9293163383545, - 3456.707995365006, - 3344.29258400927, - 3327.6234067207415, - 3633.1002317497105, - 3531.2085747392816, - 3795.0706836616455, - 3554.970451911935, - 3338.1123986095017, - 3400.8018539976824, - 4204.1825028968715, - 3480.151796060255, - 3529.5469293163383, - 4378.391657010428, - 3493.267670915411, - 3537.787369640788, - 3484.4675550405564, - 4160.369640787949, - 3473.4049826187716, - 3538.871958285052, - 3617.797798377752, - 3532.138470451912, - 3514.5758980301275, - 3434.6929316338355, - 3619.519119351101, - 3596.6743916570103, - 3541.3487833140207, - 4685.6234067207415, - 3583.676129779838, - 3560.9675550405564, - 4191.019119351101, - 3498.342410196987, - 3524.555619930475, - 4371.92989571263, - 3602.3493626882964, - 3500.0411355735805, - 3140.3279258400926, - 4029.8539976825027, - 3271.0492468134416, - 3481.422943221321, - 4667.873117033604, - 3255.2578215527233, - 3176.195828505214, - 3157.835457705678, - 3126.5816917728853, - 4313.597914252608, - 3324.0758980301275, - 4246.245654692932, - 3170.6998841251448, - 3174.515643105446, - 3117.6877172653535, - 3383.6651216685977, - 4621.423522595597, - 3558.1500579374274, - 3307.2294322132097, - 3775.0567786790266, - 3854.9611819235224, - 3347.7682502896873, - 3189.0040556199306, - 4546.151796060255, - 3567.6042873696406, - 3271.185979142526, - 5090.874275782156, - 3562.6216685979143, - 3314.8632676709153, - 3346.713209733488, - 4127.648899188876, - 3412.1952491309385, - 4242.134414831981, - 3602.285052143685, - 3489.5730011587484 + 8140.526209093542, + 1571.228496959166, + 1485.8071242397914, + 1190.1080220098465, + 1483.6817260353316, + 1740.445120185346, + 1384.2215464813205, + 1210.336229365769, + 1535.6290182450043, + 1199.1123660585, + 1507.0981754995655, + 1194.9409209383145, + 1564.8033593976252, + 1331.3176947581812, + 1206.5230234578628, + 1229.1326382855489, + 1199.5794960903563, + 1887.4746597161889, + 1218.3741673906748, + 1214.9160150593686, + 1248.0747176368375, + 1187.966695626991, + 1471.39820445989, + 1162.7775847089488, + 1207.953663481031, + 1477.0654503330438, + 1150.4929047205328, + 1616.0634231103388, + 1180.1474080509702, + 1212.4610483637416, + 1249.627280625543, + 1170.2253113234867, + 2108.4984071821605, + 1329.494063133507, + 1899.5369244135534, + 1194.067187952505, + 1652.3689545322907, + 1210.4833478134956, + 2027.0075296843324, + 1181.6739067477556, + 1303.5928178395598, + 1346.149435273675, + 1219.7379090645816, + 1335.5015928178395, + 1178.5754416449465, + 1389.8111786852012, + 1328.7379090645816, + 1202.8262380538663, + 1709.837532580365, + 1163.0784824790037, + 1841.2397914856647, + 1366.1427743990732, + 1670.5780480741385, + 1380.0220098465102, + 1227.9261511728932, + 1629.182739646684, + 1221.1752099623516, + 1769.581523313061, + 1325.8372429771214, + 1314.3802490587896, + 1675.359687228497, + 1181.8879235447437, + 1612.3822762814943, + 1184.4931943237764, + 1619.033304373009, + 1181.3984940631335, + 1461.8717057631045, + 1346.6304662612222, + 1254.1838980596583, + 1664.800173761946, + 1227.0191138140747, + 1240.5884737909064, + 1204.4792933680858, + 1741.61888213148, + 1199.7770055024616, + 1221.8821314798727, + 1164.751230813785, + 1610.4086301766579, + 1204.948450622647, + 1844.7237185056472, + 1149.0350419924703, + 1301.7103967564437, + 1593.9168838690994, + 1258.3634520706632, + 1573.0677671589922, + 1845.7306689834927, + 1157.1914277439907, + 1771.7228496959167, + 1529.7005502461627, + 1246.319142774399, + 1220.3098754706052, + 1207.0431508832899, + 1386.3179843614248, + 1249.1673906747756, + 1808.4630755864466, + 1704.4407761366926, + 1194.167101071532, + 1211.2148856067188, + 1654.5589342600638, + 1311.0049232551405 ] }, "allocationCount": { - "minimum": 99.99188876013905, - "maximum": 100.00115874855156, - "median": 100.00115874855156, - "coefficientOfVariation": 4.145693671101871E-5, + "minimum": 100.00057920648712, + "maximum": 100.00086880973068, + "median": 100.00057920648712, + "coefficientOfVariation": 1.2951368265349482E-6, "runs": [ - 100.00115874855156, - 100.00115874855156, - 100.00115874855156, - 100.00115874855156, - 99.99188876013905 + 100.00057920648712, + 100.00057920648712, + 100.00057920648712, + 100.00086880973068, + 100.00057920648712 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 1726, + "repeatIterations": 3453, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject_2026-04-20-13-16-40.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject_2026-04-23-13-01-07.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject-methodTracing-2026-04-20-13-16-39.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject-methodTracing-2026-04-23-13-01-06.trace" } ] }, { - "name": "daggerFirstInject", + "name": "daggerSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2356088332, + "totalRunTimeNs": 2722928645, "metrics": { "timeNs": { - "minimum": 3243.2996613995483, - "maximum": 16439.71106094808, - "median": 4222.595372460497, - "coefficientOfVariation": 0.3225037386791395, + "minimum": 3484.3909360440493, + "maximum": 19619.778907242693, + "median": 4384.386912325286, + "coefficientOfVariation": 0.3630333133382278, "runs": [ - 16439.71106094808, - 6456.698645598194, - 5257.268623024831, - 6756.68848758465, - 5509.491534988713, - 4643.544582392777, - 5067.512979683973, - 4830.153498871332, - 4804.216704288939, - 4962.152934537246, - 6181.121331828443, - 4859.673250564334, - 5153.22460496614, - 5049.7099322799095, - 4984.643340857788, - 5105.645033860045, - 5194.818848758465, - 4659.270880361174, - 5376.2691873589165, - 4421.856094808127, - 4367.7691873589165, - 4222.958803611738, - 5432.959367945824, - 4223.211625282167, - 4282.194695259594, - 4222.2319413092555, - 4180.695259593679, - 4158.609480812641, - 5087.822799097065, - 4195.706546275395, - 5867.816591422122, - 4039.410835214447, - 4246.3273137697515, - 4170.841986455982, - 5093.498871331828, - 4025.28611738149, - 4410.699774266365, - 3974.6162528216705, - 4421.615124153499, - 4386.071670428894, - 4336.870767494357, - 3879.2020316027088, - 3998.77539503386, - 5629.515801354401, - 4149.1190744921, - 4279.532731376975, - 5424.98927765237, - 3863.4379232505644, - 4889.638261851016, - 3832.0547404063204, - 3970.8481941309255, - 3953.277652370203, - 5189.103837471784, - 3880.7742663656886, - 3976.7031602708803, - 5427.792889390519, - 3767.7539503386006, - 3847.81151241535, - 4921.790632054176, - 3603.1337471783295, - 3858.6314898419864, - 4363.975169300225, - 3627.8707674943566, - 3713.976862302483, - 3681.6269751693003, - 4539.240970654628, - 3615.446388261851, - 3685.594808126411, - 5587.868510158013, - 3588.369074492099, - 3770.6540632054175, - 5002.2308126410835, - 3567.551354401806, - 3719.17381489842, - 5331.93058690745, - 3612.2200902934537, - 3407.244920993228, - 4429.397291196388, - 3376.665914221219, - 3402.91309255079, - 5511.699774266365, - 3368.392776523702, - 3386.3583521444693, - 4716.930022573363, - 3294.6591422121896, - 3391.6235891647857, - 3967.531038374718, - 3243.2996613995483, - 3390.0806997742666, - 4535.002257336343, - 3307.3002257336343, - 3403.589729119639, - 5090.434537246049, - 3524.6501128668174, - 3471.6636568848758, - 3709.8764108352143, - 3314.0479683972912, - 3396.11230248307, - 3681.977426636569, - 3479.4317155756207 + 19619.778907242693, + 6782.687844133841, + 5967.386277001271, + 5726.073697585769, + 6432.707750952986, + 5687.097839898348, + 5926.35959339263, + 5640.757306226175, + 5180.111817026684, + 4508.449809402796, + 4899.056332062685, + 4549.404066073697, + 4526.90681914443, + 5250.765777213045, + 4529.451503600169, + 4409.151630664973, + 4500.345192714952, + 4179.122405760271, + 4442.69250317662, + 4186.002964845405, + 4198.298602287166, + 4599.702668360864, + 4174.548919949174, + 4914.605675561203, + 4158.5230834392205, + 4990.573485811097, + 4170.59085133418, + 4384.612875900042, + 4191.819144430327, + 5271.795849216433, + 4366.717492587886, + 5584.425667090216, + 4593.149512918255, + 5069.399407030919, + 4263.277848369335, + 5884.393900889454, + 4279.653536637018, + 4911.869546802202, + 3958.786107581533, + 4417.680643795002, + 4174.264294790343, + 4901.968233799237, + 4127.908513341804, + 4848.513765353664, + 3946.568403218975, + 3954.5950868276154, + 4979.105887335874, + 5329.705209656925, + 4335.625158831004, + 3981.939008894536, + 5228.242693773825, + 3997.977128335451, + 4673.664548919949, + 3991.6903854299026, + 4845.858110969928, + 3917.319779754341, + 5026.884794578568, + 3797.5345192714954, + 4617.169843286743, + 3637.9445150360016, + 3867.830156713257, + 3588.4972469292675, + 3662.3811944091485, + 4379.79542566709, + 3619.712833545108, + 5108.890300720034, + 3662.0690385429903, + 4666.254553155442, + 3613.426514188903, + 4295.324862346463, + 3591.06056755612, + 3646.1961033460398, + 4596.628123676408, + 3656.839474798814, + 4839.074544684456, + 3587.7619652689536, + 3656.5048708174504, + 4384.160948750529, + 3802.385429902584, + 5137.658619229141, + 3620.999152901313, + 4626.943244387971, + 4491.613722998729, + 3530.9411266412535, + 3484.3909360440493, + 3831.0292249047016, + 3547.766200762389, + 4706.930537907666, + 3669.8229563744176, + 4545.196526895384, + 3837.0131300296484, + 5349.85472257518, + 3787.261753494282, + 3579.233799237611, + 4665.5120711562895, + 3731.3049555273187, + 4297.91401948327, + 3645.408725116476, + 4661.973739940703, + 3605.6344769165607 ] }, "allocationCount": { - "minimum": 100.00112866817156, - "maximum": 100.00112866817156, - "median": 100.00112866817156, - "coefficientOfVariation": 0.0, + "minimum": 100.0004235493435, + "maximum": 100.000847098687, + "median": 100.000847098687, + "coefficientOfVariation": 1.8941558069908433E-6, "runs": [ - 100.00112866817156, - 100.00112866817156, - 100.00112866817156, - 100.00112866817156, - 100.00112866817156 + 100.0004235493435, + 100.000847098687, + 100.000847098687, + 100.000847098687, + 100.000847098687 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 1772, + "repeatIterations": 2361, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject_2026-04-20-13-16-42.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject_2026-04-23-13-01-09.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject-methodTracing-2026-04-20-13-16-42.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject-methodTracing-2026-04-23-13-01-09.trace" } ] }, { - "name": "stitchRuntimeFirstInject", + "name": "stitchPrecompiledSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 3656707864, + "totalRunTimeNs": 2521997811, "metrics": { "timeNs": { - "minimum": 41545.55952380953, - "maximum": 88389.26190476191, - "median": 49015.55952380953, - "coefficientOfVariation": 0.13766848144050206, + "minimum": 3388.8176823176823, + "maximum": 19153.0, + "median": 3640.8491508491506, + "coefficientOfVariation": 0.39944583882195633, "runs": [ - 88389.26190476191, - 83044.21428571429, - 55802.294642857145, - 64098.181547619046, - 56374.306547619046, - 56454.130952380954, - 51779.19642857143, - 50496.205357142855, - 57766.26190476191, - 55139.193452380954, - 57069.520833333336, - 51937.017857142855, - 56864.880952380954, - 51617.73511904762, - 60306.29761904762, - 47229.02380952381, - 53161.119047619046, - 54621.625, - 51528.27976190476, - 47161.91071428572, - 53860.17857142857, - 57308.11309523809, - 53671.72023809524, - 45083.19940476191, - 54223.42559523809, - 50915.62202380953, - 44794.61011904762, - 50618.041666666664, - 51148.625, - 45738.51190476191, - 56383.607142857145, - 50335.53571428572, - 44308.78273809524, - 46462.51190476191, - 55294.5, - 45600.318452380954, - 56530.09821428572, - 46971.42261904762, - 46301.98809523809, - 48643.0625, - 46139.48809523809, - 50988.52976190476, - 52744.291666666664, - 46255.53869047619, - 52638.57142857143, - 48295.84523809524, - 47560.00297619047, - 56167.22321428572, - 48422.19047619047, - 51577.6875, - 57518.919642857145, - 46889.90178571428, - 47726.333333333336, - 48181.88392857143, - 48571.11607142857, - 51083.99107142857, - 55644.21726190476, - 44051.69642857143, - 49388.056547619046, - 56768.29761904762, - 45950.50892857143, - 46786.62797619047, - 53480.568452380954, - 45170.34523809524, - 49791.34226190476, - 48495.63392857143, - 53607.69940476191, - 45802.62202380953, - 45692.16071428572, - 46991.36011904762, - 52182.22023809524, - 44852.11309523809, - 47605.732142857145, - 57176.64880952381, - 50707.97023809524, - 47154.64880952381, - 44458.12202380953, - 44322.232142857145, - 46975.55952380953, - 55899.056547619046, - 45879.65773809524, - 44701.76190476191, - 45075.47321428572, - 45199.666666666664, - 42852.81547619047, - 47807.37797619047, - 42292.07738095238, - 56120.54761904762, - 41896.744047619046, - 41545.55952380953, - 47969.369047619046, - 47021.80059523809, - 42536.87797619047, - 50304.28273809524, - 55340.73809523809, - 45258.42261904762, - 48138.208333333336, - 42785.51190476191, - 56598.72619047619, - 43213.09523809524 + 19153.0, + 4452.10989010989, + 4105.006493506494, + 5088.791208791209, + 5003.030969030969, + 4096.8056943056945, + 4217.6943056943055, + 6065.585914085914, + 4145.671328671328, + 3860.613886113886, + 4835.822677322677, + 3868.954045954046, + 3734.655344655345, + 4622.08941058941, + 3638.936063936064, + 3626.319180819181, + 4584.894605394606, + 3585.171828171828, + 3422.508991008991, + 3861.426573426573, + 3413.4085914085913, + 3417.9085914085913, + 4341.091408591408, + 3645.7917082917083, + 3388.8176823176823, + 3979.076923076923, + 3784.2822177822177, + 3444.3236763236764, + 3684.5594405594406, + 3558.5064935064934, + 3417.3986013986014, + 4743.127372627373, + 3472.621878121878, + 3467.954045954046, + 3751.351148851149, + 3513.425074925075, + 3748.5904095904098, + 3575.165834165834, + 3530.4075924075923, + 3732.5134865134864, + 3544.042957042957, + 3549.027972027972, + 5016.676823176823, + 3666.2732267732267, + 3534.178821178821, + 4518.021978021978, + 3508.1778221778222, + 4279.182817182817, + 3843.8416583416583, + 3566.088911088911, + 4628.137862137862, + 3538.296203796204, + 3552.131368631369, + 4219.725274725275, + 3510.9135864135865, + 3503.5869130869132, + 3599.3556443556445, + 3713.3806193806195, + 3512.5674325674327, + 4899.193306693307, + 3858.7337662337663, + 3522.3476523476525, + 4066.031968031968, + 3633.0184815184816, + 3546.6863136863135, + 4137.693306693307, + 3589.205294705295, + 3564.032967032967, + 4764.173326673326, + 3509.5604395604396, + 3708.985014985015, + 3626.277222777223, + 3532.6613386613385, + 3502.3306693306695, + 3989.194805194805, + 3533.006993006993, + 3673.581418581419, + 3843.6453546453545, + 3535.045954045954, + 3700.7192807192805, + 3517.9085914085913, + 3572.3386613386615, + 4916.336663336663, + 3633.9155844155844, + 3551.7072927072927, + 4871.356643356643, + 3642.762237762238, + 3544.0864135864135, + 5199.988511488512, + 3529.877122877123, + 3568.7667332667334, + 4563.644855144855, + 3511.6093906093906, + 3780.5289710289712, + 3614.3876123876125, + 3483.4095904095902, + 3548.138361638362, + 4613.672327672328, + 3555.351148851149, + 3541.3221778221778 ] }, "allocationCount": { - "minimum": 1399.0, - "maximum": 1399.014880952381, - "median": 1399.0059523809523, - "coefficientOfVariation": 3.979927698217642E-6, + "minimum": 100.000999000999, + "maximum": 100.000999000999, + "median": 100.000999000999, + "coefficientOfVariation": 0.0, "runs": [ - 1399.0059523809523, - 1399.0059523809523, - 1399.0029761904761, - 1399.0, - 1399.014880952381 + 100.000999000999, + 100.000999000999, + 100.000999000999, + 100.000999000999, + 100.000999000999 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 336, + "repeatIterations": 2002, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject_2026-04-20-13-16-46.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject_2026-04-23-13-01-12.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject-methodTracing-2026-04-20-13-16-45.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject-methodTracing-2026-04-23-13-01-12.trace" } ] }, { - "name": "koinFirstInject", + "name": "koinFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 11145247079, + "totalRunTimeNs": 6816056091, "metrics": { "timeNs": { - "minimum": 216823.18579234972, - "maximum": 367592.4426229508, - "median": 246243.46174863388, - "coefficientOfVariation": 0.07880774002973046, + "minimum": 135187.87202380953, + "maximum": 219904.51488095237, + "median": 158207.6979166667, + "coefficientOfVariation": 0.06953592394952776, "runs": [ - 367592.4426229508, - 292052.4043715847, - 248168.0655737705, - 265952.0054644809, - 238725.79234972678, - 256583.22404371583, - 274422.84153005463, - 230674.43169398909, - 241284.42076502732, - 252652.54644808744, - 249440.912568306, - 256621.66666666666, - 261261.37158469946, - 238295.19672131148, - 238676.77595628417, - 263215.54098360654, - 220003.10928961748, - 257652.5956284153, - 264731.1038251366, - 254805.90163934426, - 265023.86338797817, - 280173.5355191257, - 267505.34972677595, - 238655.0163934426, - 254983.1912568306, - 241755.1693989071, - 262058.043715847, - 255666.21857923496, - 232977.84699453553, - 255060.93989071038, - 238775.37704918033, - 250649.50273224045, - 245828.5300546448, - 226398.61202185793, - 229468.87978142078, - 258487.3005464481, - 222609.6174863388, - 253932.75956284153, - 251101.12021857922, - 249191.18579234972, - 224891.31147540984, - 252908.70491803277, - 274040.0054644809, - 247344.60109289616, - 230073.73770491802, - 233774.77049180327, - 250377.087431694, - 227461.00546448087, - 222342.27322404372, - 225510.90710382513, - 261998.81967213115, - 230240.71584699454, - 246658.39344262294, - 245149.15846994537, - 244001.06010928962, - 235813.14207650273, - 241208.16393442624, - 216823.18579234972, - 246859.65027322405, - 262776.9016393443, - 229333.64480874318, - 223640.39890710384, - 252498.67213114753, - 223071.15846994537, - 233790.69398907103, - 224120.912568306, - 232872.2786885246, - 237771.81420765028, - 236525.79234972678, - 268387.92349726777, - 240685.35519125682, - 249306.6830601093, - 249648.28415300546, - 234025.18579234972, - 244549.7213114754, - 242116.6612021858, - 239182.0218579235, - 232228.80327868852, - 263512.3387978142, - 228905.9344262295, - 229727.15846994537, - 265404.38797814207, - 230935.49180327868, - 243181.43169398909, - 239215.043715847, - 237902.1038251366, - 250220.1038251366, - 274680.3224043716, - 260727.7486338798, - 264682.087431694, - 237603.65027322405, - 238499.00546448087, - 252358.5737704918, - 262268.9016393443, - 241745.78142076504, - 248306.03825136612, - 253944.9781420765, - 269519.0327868852, - 247505.11475409835, - 218367.4480874317 + 219904.51488095237, + 177736.54464285713, + 161450.58035714287, + 170902.625, + 161289.21726190476, + 161707.74404761905, + 158499.65773809524, + 158578.40476190476, + 148989.17857142858, + 172584.78869047618, + 155608.10416666666, + 160769.3125, + 155646.2380952381, + 160821.24107142858, + 158273.80952380953, + 170085.72023809524, + 155836.74107142858, + 161612.41369047618, + 163627.69642857142, + 161968.77976190476, + 146385.32142857142, + 164489.70535714287, + 158141.58630952382, + 155663.75297619047, + 165702.50595238095, + 167666.16964285713, + 157170.13988095237, + 150514.0119047619, + 157575.02380952382, + 162837.6130952381, + 152280.50595238095, + 172246.24702380953, + 160904.63988095237, + 156379.74404761905, + 159576.5119047619, + 159474.36011904763, + 167833.58035714287, + 158858.81845238095, + 152985.95535714287, + 169298.4255952381, + 157669.11607142858, + 165858.29166666666, + 176828.02976190476, + 165856.42857142858, + 168100.35416666666, + 166146.91964285713, + 159328.96130952382, + 163597.78273809524, + 169443.35714285713, + 156387.33630952382, + 163989.95535714287, + 171282.8630952381, + 161480.19047619047, + 154343.2232142857, + 165128.3482142857, + 153669.5505952381, + 167234.93154761905, + 167429.47023809524, + 166892.82738095237, + 154678.50892857142, + 157038.69047619047, + 154478.38988095237, + 156157.46130952382, + 147123.16964285713, + 150919.98214285713, + 142866.90773809524, + 159478.85416666666, + 153534.69047619047, + 152336.30952380953, + 135187.87202380953, + 145504.55654761905, + 145837.52083333334, + 152019.3125, + 158657.6130952381, + 144358.87797619047, + 141854.22916666666, + 154332.0625, + 147756.07738095237, + 163833.8630952381, + 150640.19047619047, + 146158.85416666666, + 148653.11904761905, + 149380.88988095237, + 153259.08333333334, + 173300.4732142857, + 137634.5505952381, + 148974.14285714287, + 152010.63392857142, + 164784.07142857142, + 149426.46130952382, + 151119.94642857142, + 140691.0357142857, + 145535.09523809524, + 141477.55654761905, + 139273.77976190476, + 158324.80654761905, + 140818.60714285713, + 160052.39285714287, + 158299.85119047618, + 150296.84523809524 ] }, "allocationCount": { - "minimum": 3987.9890710382515, - "maximum": 3988.0273224043717, - "median": 3988.0218579234975, - "coefficientOfVariation": 4.0415850342243326E-6, + "minimum": 2500.0, + "maximum": 2500.0148809523807, + "median": 2500.0119047619046, + "coefficientOfVariation": 2.3809438775467426E-6, "runs": [ - 3987.9890710382515, - 3988.0273224043717, - 3988.0109289617485, - 3988.0218579234975, - 3988.0273224043717 + 2500.0119047619046, + 2500.0, + 2500.0059523809523, + 2500.0148809523807, + 2500.0119047619046 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 183, + "repeatIterations": 336, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject_2026-04-20-13-16-57.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject_2026-04-23-13-01-19.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject-methodTracing-2026-04-20-13-16-56.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject-methodTracing-2026-04-23-13-01-18.trace" } ] }, { - "name": "stitchRuntimeRepeatedInject", + "name": "stitchRuntimeSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 4459298228, + "totalRunTimeNs": 2950609686, "metrics": { "timeNs": { - "minimum": 9369.783775351014, - "maximum": 12875.16255850234, - "median": 9929.02511700468, - "coefficientOfVariation": 0.0514235272513001, + "minimum": 8935.84837962963, + "maximum": 17397.340277777777, + "median": 9846.311921296296, + "coefficientOfVariation": 0.09242252196184368, "runs": [ - 12875.16255850234, - 9465.58127925117, - 9369.783775351014, - 9920.924180967238, - 10286.824024960999, - 10712.57472698908, - 9632.264274570984, - 9589.590015600625, - 10130.996255850234, - 10658.427457098283, - 9631.808736349454, - 9551.12449297972, - 9662.7503900156, - 9959.535725429017, - 10540.984399375975, - 9562.256474258971, - 9512.057722308893, - 9720.29391575663, - 9929.293291731668, - 10560.891107644306, - 9594.318876755071, - 9605.970358814353, - 9889.040561622465, - 10204.676755070202, - 10921.931981279251, - 9622.139781591264, - 9588.240873634946, - 9928.75694227769, - 9999.707644305772, - 10667.154134165366, - 9628.705148205929, - 9646.775975039001, - 9936.93104524181, - 10042.268018720748, - 10443.902964118564, - 9609.529173166926, - 9580.798127925116, - 10035.978783151326, - 10159.955382215288, - 10612.454602184087, - 9631.857722308892, - 9608.261778471138, - 9990.639625585023, - 10139.268018720748, - 10854.329173166927, - 9599.372542901716, - 9591.63744149766, - 10156.526365054602, - 10243.109828393135, - 10310.858658346333, - 9613.933541341654, - 9627.697347893916, - 10058.957254290171, - 11038.871450858034, - 9863.526989079563, - 9616.127301092043, - 9650.936037441497, - 10107.546645865834, - 10803.822152886116, - 9794.933229329174, - 9644.208424336974, - 9771.954446177848, - 10098.592823712948, - 10760.48174726989, - 9604.231825273011, - 9612.454602184087, - 10004.404056162246, - 10147.165678627145, - 10725.526365054602, - 9775.221216848673, - 9627.226209048362, - 9823.176599063963, - 10147.994695787831, - 10722.40624024961, - 9575.825585023402, - 9557.33229329173, - 9983.050546021841, - 10171.054602184087, - 10797.565678627145, - 9691.741341653666, - 9579.563182527301, - 9798.8496099844, - 9966.409984399375, - 11097.893915756631, - 9586.859906396256, - 9643.216848673947, - 9954.36817472699, - 10116.728549141966, - 10709.860842433698, - 9613.007176287052, - 9607.384087363494, - 9980.742901716068, - 10152.83744149766, - 10526.439625585024, - 9621.928861154447, - 9601.06271450858, - 10165.106708268331, - 10192.488923556943, - 10665.0255850234, - 9596.83775351014 + 17397.340277777777, + 10426.432291666666, + 9137.219328703704, + 8935.84837962963, + 9268.783564814816, + 11344.491319444445, + 9591.22974537037, + 9397.24363425926, + 9526.096064814816, + 11116.023726851852, + 9935.890046296296, + 9984.95949074074, + 10406.750578703704, + 11593.575231481482, + 10094.219907407407, + 9916.05787037037, + 10054.705439814816, + 11110.508101851852, + 9990.807291666666, + 9916.871527777777, + 9932.394097222223, + 10044.035300925925, + 12156.936921296296, + 9963.258101851852, + 9900.143518518518, + 9980.408564814816, + 11188.452546296296, + 10011.695023148148, + 10105.281828703704, + 9971.939236111111, + 10077.673032407407, + 11618.109953703704, + 9928.355324074075, + 10001.416666666666, + 10035.596064814816, + 9888.961226851852, + 10828.782407407407, + 9921.875, + 9645.694444444445, + 9792.148726851852, + 10416.184027777777, + 9424.672453703704, + 9488.510416666666, + 9842.875578703704, + 9675.142361111111, + 10824.170717592593, + 9769.181712962964, + 9766.860532407407, + 9711.883680555555, + 10739.655671296296, + 9706.42824074074, + 9684.154513888889, + 9845.648726851852, + 9754.623842592593, + 10690.917824074075, + 9841.79050925926, + 9683.581597222223, + 9806.13425925926, + 10800.389467592593, + 9619.954282407407, + 9640.359953703704, + 9862.97974537037, + 9908.341435185184, + 10900.366319444445, + 9909.607638888889, + 9641.143518518518, + 9749.680555555555, + 9846.97511574074, + 10622.166666666666, + 9719.60011574074, + 9774.305555555555, + 9661.307291666666, + 9585.503472222223, + 10926.77025462963, + 9756.974537037036, + 9772.28587962963, + 9794.168402777777, + 10646.611111111111, + 9676.890625, + 9428.37962962963, + 9420.512152777777, + 9592.67650462963, + 11246.624421296296, + 9352.24363425926, + 9662.513310185184, + 9654.616319444445, + 10504.225694444445, + 9717.429976851852, + 9694.642939814816, + 9635.928819444445, + 9885.976851851852, + 10684.19675925926, + 9770.47800925926, + 9721.920717592593, + 9664.502893518518, + 9761.947916666666, + 10391.076967592593, + 9517.83738425926, + 9731.445023148148, + 9841.670138888889 ] }, "allocationCount": { - "minimum": 100.000624024961, - "maximum": 100.000624024961, - "median": 100.000624024961, - "coefficientOfVariation": 0.0, + "minimum": 200.00115740740742, + "maximum": 200.00173611111111, + "median": 200.00115740740742, + "coefficientOfVariation": 1.2940125829449293E-6, "runs": [ - 100.000624024961, - 100.000624024961, - 100.000624024961, - 100.000624024961, - 100.000624024961 + 200.00173611111111, + 200.00115740740742, + 200.00115740740742, + 200.00115740740742, + 200.00115740740742 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 3205, + "repeatIterations": 1728, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject_2026-04-20-13-17-01.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject_2026-04-23-13-01-22.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject-methodTracing-2026-04-20-13-17-01.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject-methodTracing-2026-04-23-13-01-22.trace" } ] }, { - "name": "koinRepeatedInject", + "name": "koinSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 5279879165, + "totalRunTimeNs": 5222940050, "metrics": { "timeNs": { - "minimum": 59695.72368421053, - "maximum": 90275.83552631579, - "median": 64461.305921052626, - "coefficientOfVariation": 0.06004817873256966, + "minimum": 65152.348314606745, + "maximum": 104134.28464419476, + "median": 73161.6245318352, + "coefficientOfVariation": 0.060016995285315684, "runs": [ - 90275.83552631579, - 63139.39144736842, - 63154.21052631579, - 63027.25822368421, - 64720.30756578947, - 63363.83059210526, - 64608.51973684211, - 65764.11677631579, - 71111.48190789473, - 59695.72368421053, - 62705.50657894737, - 62714.58717105263, - 64872.19078947369, - 63003.78618421053, - 63109.06743421053, - 64913.90789473684, - 67787.14309210527, - 70093.97203947368, - 66531.57565789473, - 67499.74177631579, - 65039.23355263158, - 63610.88322368421, - 71895.6447368421, - 61978.22368421053, - 69474.71217105263, - 62508.13815789474, - 66359.99177631579, - 63397.15296052631, - 64997.94407894737, - 65390.19736842105, - 63465.34046052631, - 67089.50164473684, - 71316.04605263157, - 61435.97532894737, - 60673.48519736842, - 67604.25164473684, - 60612.49342105263, - 66802.27138157895, - 60090.28947368421, - 62111.77302631579, - 61058.88486842105, - 63135.36513157895, - 66166.99177631579, - 61968.88651315789, - 63348.49506578947, - 62289.69736842105, - 63923.03947368421, - 64191.33881578947, - 68570.4490131579, - 64307.15460526316, - 64997.25822368421, - 63552.88815789474, - 63306.17763157895, - 61253.94078947369, - 66297.71546052632, - 60665.43256578947, - 67594.14309210527, - 65638.3634868421, - 62571.52796052631, - 63300.69572368421, - 62045.12664473684, - 64802.28947368421, - 60168.15625, - 61295.23026315789, - 62665.75822368421, - 64313.49342105263, - 67694.62664473684, - 63604.37171052631, - 62750.82236842105, - 65469.26315789474, - 63111.29440789474, - 67885.74177631579, - 66657.67269736843, - 65496.07730263158, - 64408.75164473684, - 64778.55921052631, - 62988.70888157895, - 65906.9177631579, - 69507.52138157895, - 62457.76809210526, - 65993.18092105263, - 65975.3634868421, - 69674.82072368421, - 74128.03289473684, - 63026.65953947369, - 68965.70065789473, - 70328.69078947368, - 66689.79440789473, - 60963.45559210526, - 64513.86019736842, - 66453.96546052632, - 61899.84210526316, - 63661.85197368421, - 68905.3947368421, - 68768.67434210527, - 65008.13815789474, - 72072.11184210527, - 61516.15625, - 63899.91118421053, - 67020.1134868421 + 104134.28464419476, + 72437.08988764045, + 77418.75280898876, + 69411.18539325842, + 73344.35580524345, + 73531.81647940075, + 71130.52059925093, + 79989.36891385767, + 69764.06554307116, + 74396.65355805244, + 75356.58426966293, + 74123.06928838951, + 72940.46441947565, + 70904.23970037453, + 70193.80149812734, + 70932.03745318353, + 78467.05430711611, + 76385.67041198502, + 72562.12921348315, + 75614.07490636704, + 66296.13295880149, + 75414.22846441947, + 73418.38389513109, + 76210.9850187266, + 70942.18164794007, + 77286.49625468165, + 69309.65168539326, + 73579.70411985018, + 70095.38764044944, + 73302.31835205993, + 73609.74531835206, + 73934.63295880149, + 71141.24906367042, + 70248.12734082396, + 74353.05430711611, + 72148.19288389513, + 73598.33333333333, + 70997.29026217229, + 70481.81835205993, + 78548.29962546816, + 70898.29026217229, + 70529.02621722847, + 74046.70037453184, + 77501.85393258427, + 71176.65355805244, + 79273.9531835206, + 77189.9382022472, + 71252.4382022472, + 76275.84644194756, + 68589.94569288389, + 71956.83146067416, + 77881.16479400749, + 69776.64606741573, + 71428.38951310862, + 74620.78651685393, + 71115.40262172285, + 77033.00561797753, + 72788.99438202247, + 73714.98689138576, + 74303.11797752809, + 71782.73220973783, + 79181.88202247191, + 76642.18539325842, + 73020.93071161049, + 70204.04119850187, + 70174.0, + 74222.45692883895, + 73999.29775280898, + 78072.234082397, + 71110.32958801498, + 74236.89138576778, + 80071.00561797753, + 72947.38951310862, + 75355.31647940075, + 77832.00749063671, + 74851.06554307116, + 68908.88389513109, + 72044.80711610487, + 73990.71535580524, + 75071.88389513109, + 75809.34082397004, + 69140.82022471911, + 70871.76029962547, + 72522.82397003745, + 70730.43445692884, + 67580.66104868914, + 74096.83146067416, + 71259.55992509364, + 70416.3745318352, + 73873.08801498127, + 68673.14419475655, + 71468.18352059925, + 69915.24344569289, + 77545.9382022472, + 65152.348314606745, + 72485.27153558053, + 67853.75655430711, + 68702.20786516854, + 76037.96067415731, + 73456.32584269663 ] }, "allocationCount": { - "minimum": 1199.998355263158, - "maximum": 1200.014802631579, - "median": 1200.0049342105262, - "coefficientOfVariation": 4.9036336498336426E-6, + "minimum": 1199.996254681648, + "maximum": 1200.0056179775281, + "median": 1200.0, + "coefficientOfVariation": 3.3104250055492272E-6, "runs": [ - 1200.014802631579, - 1200.0049342105262, - 1200.0065789473683, - 1199.998355263158, - 1200.0049342105262 + 1199.996254681648, + 1200.0056179775281, + 1200.0018726591761, + 1199.996254681648, + 1200.0 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 608, + "repeatIterations": 534, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject_2026-04-20-13-17-07.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject_2026-04-23-13-01-27.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject-methodTracing-2026-04-20-13-17-06.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject-methodTracing-2026-04-23-13-01-27.trace" } ] }, { - "name": "stitchPrecompiledRepeatedInject", + "name": "stitchPrecompiledFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1249803958, + "totalRunTimeNs": 3395047238, "metrics": { "timeNs": { - "minimum": 404.3340380549683, - "maximum": 6463.2683067461085, - "median": 437.7983855468, - "coefficientOfVariation": 1.1812228994160061, + "minimum": 1092.8465744062873, + "maximum": 4722.195113616948, + "median": 1219.851187425252, + "coefficientOfVariation": 0.2979754222080834, "runs": [ - 6463.2683067461085, - 857.3278877570632, - 609.8345185469922, - 580.7747453392274, - 560.8041514510859, - 550.8541226215644, - 513.7561022487026, - 495.6075341149337, - 504.95714011147413, - 499.35133576782624, - 489.8116471266577, - 474.2256390543917, - 508.851047472612, - 501.6236786469345, - 500.47241975783203, - 494.61656736498173, - 499.731693253892, - 489.481068614261, - 477.30866807610994, - 456.5575629444551, - 463.5846626945993, - 448.94964443590237, - 437.4779934653085, - 437.2377474533923, - 441.04151451085914, - 437.18758408610415, - 438.0886027291947, - 436.6771093599846, - 439.66019604074575, - 437.3178935229675, - 438.29867384201424, - 441.2817605227753, - 413.8737266961368, - 404.6442437055545, - 404.3340380549683, - 411.8216413607534, - 417.46742264078415, - 409.85969632904096, - 416.67672496636555, - 420.5306553911205, - 412.4124543532577, - 417.3373054007304, - 420.8408610417067, - 417.20718816067654, - 418.5185469921199, - 445.10570824524314, - 411.42129540649626, - 422.492600422833, - 413.99384970209496, - 419.8898712281376, - 424.87507207380355, - 422.72285220065345, - 425.1453007880069, - 417.9379204305209, - 423.42360176821063, - 422.89294637709014, - 418.6986354026523, - 426.1562560061503, - 420.4804920238324, - 428.1183932346723, - 436.75725542955985, - 442.22294829905826, - 437.6480876417451, - 437.6480876417451, - 440.4009225446858, - 437.0874495483375, - 439.1996924851047, - 437.26792235248894, - 439.75033634441667, - 438.16874879876997, - 437.43782433211607, - 441.8425908129925, - 437.2177589852009, - 438.34902940611187, - 436.8673842014223, - 441.38208725735154, - 439.3399961560638, - 437.4779934653085, - 439.3999615606381, - 438.148568133769, - 439.58004997117047, - 437.10743801652893, - 442.24274457044015, - 438.2287142033442, - 437.40784162982897, - 440.7213146261772, - 437.4979819334999, - 438.9494522390928, - 436.90736113780514, - 440.7313088602729, - 437.70824524312894, - 437.45800499711703, - 445.145685181626, - 436.91735537190084, - 437.7783970786085, - 437.8183740149914, - 440.2106477032481, - 439.32980972515855, - 437.28771862387083, - 441.241975783202 + 4722.195113616948, + 1478.3070220399795, + 1192.6678626345463, + 1175.9154279856484, + 1204.5491201093457, + 1378.8436699128652, + 1257.180078592175, + 1155.71348026653, + 1092.8465744062873, + 1371.5767982231334, + 1509.4606184862464, + 1164.1822996753801, + 1656.8089868443533, + 1187.6502648214591, + 1407.7898513582777, + 1595.0321202801981, + 1118.9642918161626, + 1165.0951648727148, + 1146.4942764394327, + 1589.7900222108321, + 1301.9979497693491, + 1143.2330428839912, + 1201.5463864684777, + 1248.1817871177175, + 1862.0059798393986, + 1439.7700324619852, + 1298.0693661370237, + 1905.1173757047668, + 1373.9371262600375, + 1283.2267213394841, + 1170.2231334358448, + 1394.1180591149837, + 1176.508969759098, + 1174.4023577652486, + 1244.9685631300188, + 1170.4273022381685, + 1203.0760293866392, + 1158.0150350247736, + 1897.6338629762515, + 1440.118913377755, + 1238.4695028190672, + 1135.2991628224843, + 1679.0720997778917, + 1235.9497693490518, + 1147.6994703570817, + 1190.3488809157698, + 1155.6548778404238, + 1187.3806594908594, + 1143.54245685973, + 1664.3063386297624, + 1137.1185716726466, + 1420.8735691098582, + 1131.5115325474117, + 1261.6169485733813, + 1251.8836494105587, + 1145.7579019306338, + 1157.6950281906713, + 1157.861609431061, + 1222.3987698616095, + 1197.9463522979668, + 1204.5812403895438, + 1145.394327695199, + 1419.746796514608, + 1162.7985648385443, + 1216.1440287032292, + 1145.2345805569794, + 1821.371262600376, + 1177.8812574747992, + 1748.6497522637962, + 1164.076541944302, + 1194.7474799248248, + 1220.909618998804, + 1132.8103536647873, + 1711.534085084572, + 1152.9943618657098, + 1289.390056381343, + 1185.9518195797027, + 1265.5889287544849, + 1987.5217837006662, + 1182.7664445583462, + 1129.0837177515805, + 1163.1131043909106, + 1300.566888774987, + 1237.5776524859048, + 1311.3335041858875, + 1126.415171706817, + 1562.7695199043226, + 1153.006321544507, + 1230.4524175636425, + 1215.589612164702, + 1218.7927558517, + 1222.765761148129, + 1645.8308559712968, + 1330.8940714163678, + 1271.0228942422689, + 1507.6492397061336, + 1294.8535793610115, + 1172.0509140611653, + 1313.9917990773963, + 1187.5590295574918 ] }, "allocationCount": { - "minimum": 3.843936190659235E-4, - "maximum": 3.843936190659235E-4, - "median": 3.843936190659235E-4, - "coefficientOfVariation": 0.0, + "minimum": 99.99931658978302, + "maximum": 100.00085426277123, + "median": 100.0003417051085, + "coefficientOfVariation": 5.614774447873491E-6, "runs": [ - 3.843936190659235E-4, - 3.843936190659235E-4, - 3.843936190659235E-4, - 3.843936190659235E-4, - 3.843936190659235E-4 + 100.0003417051085, + 100.0003417051085, + 100.00085426277123, + 100.0003417051085, + 99.99931658978302 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 5203, + "repeatIterations": 5853, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject_2026-04-20-13-17-08.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject_2026-04-23-13-01-30.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject-methodTracing-2026-04-20-13-17-08.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject-methodTracing-2026-04-23-13-01-30.trace" } ] }, { - "name": "daggerRepeatedInject", + "name": "stitchRuntimeFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1379251041, + "totalRunTimeNs": 2015471978, "metrics": { "timeNs": { - "minimum": 395.3867279224094, - "maximum": 932.9270035732517, - "median": 397.2902501276161, - "coefficientOfVariation": 0.3091697496325579, + "minimum": 16223.264444444445, + "maximum": 58074.42222222222, + "median": 18723.38111111111, + "coefficientOfVariation": 0.23930340041684936, "runs": [ - 932.9270035732517, - 615.8914752424706, - 603.7837672281777, - 600.9231240428791, - 604.2411434405309, - 605.7619193466054, - 760.406023481368, - 887.6127616130678, - 887.1288412455334, - 890.7552833078101, - 887.410719754977, - 889.1388463501787, - 888.3465033180194, - 715.8360387953037, - 424.9935681470138, - 396.3650842266463, - 398.8482899438489, - 396.17366003062784, - 397.27963246554367, - 396.21082184788156, - 397.5827462991322, - 396.06197039305766, - 397.72098009188363, - 396.11516079632463, - 397.2849412965799, - 396.06197039305766, - 401.21980602348134, - 396.3226135783563, - 400.608269525268, - 400.32108218478817, - 398.30587034201125, - 396.26401225114853, - 395.89188361408884, - 399.07156712608474, - 395.89178152118427, - 397.59346605410923, - 395.95558958652373, - 399.3640632976008, - 395.96100051046454, - 399.810719754977, - 396.39703930576826, - 399.2258295048494, - 396.0939254721797, - 398.3696784073507, - 396.1576314446146, - 397.15732516590094, - 396.0566615620214, - 398.2899438489025, - 396.0778968861664, - 401.0230729964268, - 396.24277692700355, - 397.9815211842777, - 396.54047983665134, - 397.7581419091373, - 395.87585502807553, - 397.96018376722816, - 396.04073506891274, - 399.8692189892802, - 396.1045431342522, - 397.029709035222, - 395.98223583460947, - 397.29555895865235, - 396.37039305768246, - 397.08289943848905, - 395.94497192445124, - 397.8326697294538, - 396.08320571720265, - 397.56151097498724, - 395.3867279224094, - 396.1524247064829, - 397.8539050535988, - 396.07258805513015, - 400.7678407350689, - 395.8120469627361, - 397.2690148034712, - 396.2906584992343, - 397.99744767738645, - 395.92373660030626, - 397.4072485962226, - 395.89188361408884, - 397.2371618172537, - 396.274629913221, - 397.43379275140376, - 397.2211332312404, - 397.91771311893825, - 395.98223583460947, - 397.3647779479326, - 396.08861664114346, - 397.46043899948955, - 396.00347115875445, - 397.4179683511996, - 396.0778968861664, - 397.64124553343544, - 395.9981623277182, - 398.5770290964778, - 396.16294027565084, - 398.0400204185809, - 396.48739152628895, - 401.804696273609, - 396.18427769270033 + 58074.42222222222, + 33732.64, + 21720.14, + 18469.67777777778, + 18826.15777777778, + 20936.11111111111, + 23099.884444444444, + 18697.915555555555, + 18761.804444444446, + 18615.277777777777, + 23439.931111111113, + 20496.644444444446, + 18558.564444444444, + 18384.14222222222, + 23406.944444444445, + 19255.44, + 18696.64222222222, + 18660.068888888887, + 19415.393333333333, + 18905.786666666667, + 26673.495555555557, + 19034.606666666667, + 18645.486666666668, + 18659.606666666667, + 18717.13111111111, + 23201.042222222222, + 18690.97111111111, + 18564.004444444443, + 18546.644444444446, + 19099.073333333334, + 18926.737777777777, + 24144.79111111111, + 18771.99111111111, + 18544.562222222223, + 18591.32, + 26178.355555555554, + 19587.615555555556, + 18636.457777777778, + 18601.504444444443, + 18729.63111111111, + 19298.38, + 18855.324444444443, + 24635.415555555555, + 18753.47333333333, + 18585.068888888887, + 18603.355555555554, + 23435.071111111112, + 18757.522222222222, + 18682.175555555557, + 18711.11111111111, + 18828.704444444444, + 19191.088888888888, + 23793.17111111111, + 18883.217777777776, + 18526.38888888889, + 18653.82, + 18416.204444444444, + 23684.373333333333, + 18929.166666666668, + 18732.406666666666, + 18549.53777777778, + 19550.34888888889, + 19000.464444444446, + 26443.635555555556, + 19176.62222222222, + 18775.577777777777, + 18589.69777777778, + 18657.86888888889, + 26396.52666666667, + 19658.68222222222, + 18350.46222222222, + 18332.524444444443, + 18620.833333333332, + 24287.268888888888, + 18504.051111111112, + 18146.18, + 17606.02, + 18013.426666666666, + 27016.32, + 19470.717777777776, + 18342.94, + 17247.80222222222, + 17489.004444444443, + 17516.897777777776, + 22772.80222222222, + 17274.535555555554, + 16877.19777777778, + 16689.931111111113, + 24313.65777777778, + 17280.20888888889, + 16447.684444444443, + 16345.833333333334, + 16903.933333333334, + 16900.80888888889, + 23156.364444444444, + 17056.133333333335, + 16518.864444444444, + 16223.264444444445, + 17122.33777777778, + 25459.373333333333 ] }, "allocationCount": { - "minimum": 2.041858090862685E-4, - "maximum": 2.041858090862685E-4, - "median": 2.041858090862685E-4, + "minimum": 415.00444444444446, + "maximum": 415.00444444444446, + "median": 415.00444444444446, "coefficientOfVariation": 0.0, "runs": [ - 2.041858090862685E-4, - 2.041858090862685E-4, - 2.041858090862685E-4, - 2.041858090862685E-4, - 2.041858090862685E-4 + 415.00444444444446, + 415.00444444444446, + 415.00444444444446, + 415.00444444444446, + 415.00444444444446 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 9795, + "repeatIterations": 450, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject_2026-04-20-13-17-09.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject_2026-04-23-13-01-32.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject-methodTracing-2026-04-20-13-17-09.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject-methodTracing-2026-04-23-13-01-32.trace" } ] } diff --git a/docs/benchmarks/injection-performance/injection-performance-200-fixtures.json b/docs/benchmarks/injection-performance/injection-performance-200-fixtures.json deleted file mode 100644 index f720642..0000000 --- a/docs/benchmarks/injection-performance/injection-performance-200-fixtures.json +++ /dev/null @@ -1,1187 +0,0 @@ -{ - "context": { - "build": { - "brand": "samsung", - "device": "e3q", - "fingerprint": "samsung/e3qxxx/e3q:16/BP2A.250605.031.A3/S928BXXS5CZC1:user/release-keys", - "id": "BP2A.250605.031.A3", - "model": "SM-S928B", - "type": "user", - "version": { - "codename": "REL", - "sdk": 36 - } - }, - "cpuCoreCount": 8, - "cpuLocked": false, - "cpuMaxFreqHz": 3398400000, - "memTotalBytes": 11624239104, - "sustainedPerformanceModeEnabled": false, - "artMainlineVersion": 361400140, - "osCodenameAbbreviated": "REL", - "compilationMode": "verify", - "payload": {} - }, - "benchmarks": [ - { - "name": "stitchPrecompiledFirstInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2470593020, - "metrics": { - "timeNs": { - "minimum": 6553.556666666666, - "maximum": 59705.28111111111, - "median": 7900.2, - "coefficientOfVariation": 0.6180020710542888, - "runs": [ - 59705.28111111111, - 21564.00222222222, - 14694.082222222221, - 10439.871111111112, - 8544.73, - 8439.746666666666, - 8658.052222222223, - 8512.782222222222, - 8365.105555555556, - 8940.094444444445, - 8234.558888888889, - 8234.376666666667, - 9711.32, - 8191.253333333333, - 8118.818888888889, - 9772.626666666667, - 8208.67111111111, - 8103.624444444445, - 9880.756666666666, - 8147.1211111111115, - 8158.235555555556, - 9853.808888888889, - 8243.66888888889, - 8085.934444444444, - 8131.528888888889, - 9514.75111111111, - 7996.82, - 8016.6611111111115, - 8454.682222222222, - 7961.574444444444, - 7829.384444444445, - 8310.94, - 8192.692222222222, - 7791.083333333333, - 8349.655555555555, - 7893.82, - 7765.955555555555, - 7697.687777777778, - 7906.58, - 7394.275555555556, - 7214.068888888889, - 8955.845555555556, - 7323.913333333333, - 7242.491111111111, - 8127.497777777778, - 7388.34, - 7192.187777777778, - 9096.464444444444, - 7253.95, - 7256.886666666666, - 7296.004444444445, - 9576.907777777778, - 7388.134444444445, - 7200.421111111111, - 9103.763333333334, - 7236.4077777777775, - 7213.427777777778, - 7269.152222222222, - 9960.72, - 7258.047777777778, - 7276.345555555556, - 10366.436666666666, - 7283.2155555555555, - 7284.6033333333335, - 10007.528888888888, - 7447.81, - 7173.716666666666, - 9809.621111111112, - 7375.61, - 7351.466666666666, - 9443.91, - 7801.914444444445, - 7292.8788888888885, - 7789.518888888889, - 9217.364444444445, - 7491.917777777778, - 7488.966666666666, - 9736.866666666667, - 7300.514444444444, - 7186.624444444445, - 10124.814444444444, - 7262.427777777778, - 7249.946666666667, - 7251.863333333334, - 10325.865555555556, - 7339.271111111111, - 7202.366666666667, - 11570.377777777778, - 7150.187777777778, - 6553.556666666666, - 8986.752222222221, - 7357.854444444444, - 7128.124444444445, - 7334.902222222222, - 7315.833333333333, - 6632.097777777778, - 6633.13, - 7595.52, - 7269.685555555556, - 6783.944444444444 - ] - }, - "allocationCount": { - "minimum": 200.00222222222223, - "maximum": 200.00222222222223, - "median": 200.00222222222223, - "coefficientOfVariation": 0.0, - "runs": [ - 200.00222222222223, - 200.00222222222223, - 200.00222222222223, - 200.00222222222223, - 200.00222222222223 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 900, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject_2026-04-20-13-18-46.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject-methodTracing-2026-04-20-13-18-46.trace" - } - ] - }, - { - "name": "daggerFirstInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2410898697, - "metrics": { - "timeNs": { - "minimum": 7998.512683578104, - "maximum": 46753.18024032043, - "median": 12079.119492656875, - "coefficientOfVariation": 0.38760261350722264, - "runs": [ - 46753.18024032043, - 33838.60213618157, - 26929.707610146863, - 19719.9132176235, - 17218.72096128171, - 16205.85046728972, - 15041.652870493992, - 12738.210947930575, - 12611.9826435247, - 13614.251001335113, - 13249.360480640855, - 12091.384512683579, - 14327.365821094792, - 12366.234979973298, - 12135.987983978639, - 12940.162883845127, - 16458.670226969294, - 12275.877169559413, - 15125.647530040053, - 12431.345794392524, - 12308.348464619492, - 12353.136181575434, - 17109.140186915887, - 12329.562082777036, - 12404.089452603472, - 15670.938584779706, - 12370.523364485982, - 12288.726301735647, - 13953.463284379171, - 12314.895861148198, - 12505.631508678238, - 14535.710280373833, - 12066.854472630173, - 12237.969292389853, - 14536.337783711615, - 12221.687583444593, - 12369.271028037383, - 13023.077436582109, - 11861.929238985314, - 11767.687583444593, - 11745.11481975968, - 13448.001335113484, - 11185.13751668892, - 10739.954606141522, - 15819.371161548732, - 10485.99465954606, - 10208.41655540721, - 13595.77303070761, - 10090.819759679573, - 10297.7129506008, - 14387.535380507343, - 10141.185580774365, - 10247.11748998665, - 10715.392523364486, - 10283.995994659546, - 10130.871829105474, - 10247.97997329773, - 15252.679572763685, - 10239.058744993325, - 10308.036048064085, - 13451.610146862484, - 10014.049399198931, - 10134.767690253671, - 14164.424566088117, - 10288.84512683578, - 10116.75300400534, - 13506.359145527369, - 10047.42857142857, - 10178.651535380508, - 12815.081441922563, - 10150.016021361816, - 10057.357810413885, - 10134.3391188251, - 13703.265687583445, - 10106.168224299065, - 10120.503337783712, - 13592.363150867825, - 10204.297730307077, - 10124.475300400534, - 10750.512683578105, - 11992.950600801069, - 10165.30173564753, - 10188.71562082777, - 13954.045393858478, - 10116.9652870494, - 10311.048064085448, - 13698.078771695595, - 10149.02269692924, - 8809.949265687583, - 10709.778371161548, - 8393.676902536716, - 8732.388518024032, - 8816.260347129506, - 11704.503337783712, - 8298.440587449933, - 8212.403204272363, - 11031.859813084113, - 8066.707610146863, - 8081.20694259012, - 7998.512683578104 - ] - }, - "allocationCount": { - "minimum": 200.0026702269693, - "maximum": 200.0026702269693, - "median": 200.0026702269693, - "coefficientOfVariation": 0.0, - "runs": [ - 200.0026702269693, - 200.0026702269693, - 200.0026702269693, - 200.0026702269693, - 200.0026702269693 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 749, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject_2026-04-20-13-18-48.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject-methodTracing-2026-04-20-13-18-48.trace" - } - ] - }, - { - "name": "stitchRuntimeFirstInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 3941173332, - "metrics": { - "timeNs": { - "minimum": 89226.52694610778, - "maximum": 187451.37125748504, - "median": 103042.67964071856, - "coefficientOfVariation": 0.14639225752401025, - "runs": [ - 187451.37125748504, - 155674.60479041917, - 153168.04790419163, - 128624.91616766468, - 124879.59880239521, - 132514.06586826348, - 115438.47904191617, - 133192.76047904193, - 115254.15568862275, - 134275.88622754492, - 107689.91616766468, - 129403.07784431138, - 108096.01796407186, - 94158.28143712576, - 91369.82035928144, - 100933.15568862275, - 91216.60479041917, - 104699.92814371258, - 97655.8862275449, - 93716.61676646706, - 108320.82035928144, - 105768.1736526946, - 117712.37125748504, - 94769.50898203593, - 106219.83233532934, - 96500.09580838324, - 113840.41916167665, - 103463.07784431138, - 111678.80838323354, - 95877.90419161676, - 89625.99401197604, - 91608.65868263473, - 97747.89221556886, - 104244.03592814371, - 101197.59880239521, - 101142.65868263473, - 92942.5748502994, - 106971.0119760479, - 106116.50898203593, - 116772.70059880239, - 103270.92814371258, - 101404.02994011976, - 90559.82035928144, - 102814.43113772455, - 100524.25149700599, - 104989.73053892216, - 126538.48502994012, - 98378.874251497, - 89226.52694610778, - 119897.37125748504, - 94191.58682634731, - 104012.31736526947, - 101106.22155688623, - 93982.08383233532, - 118246.64670658682, - 90067.06586826347, - 91395.95209580839, - 102175.5508982036, - 111205.38922155689, - 94060.91616766468, - 93584.9880239521, - 101297.10179640718, - 110604.11976047904, - 89607.59880239521, - 104265.83233532934, - 115877.34131736527, - 94562.05988023953, - 96995.64670658682, - 106270.2874251497, - 93539.49101796407, - 106233.50898203593, - 115020.56886227545, - 113244.80838323354, - 92805.67664670659, - 114792.86826347305, - 112188.70658682635, - 93241.41317365269, - 118366.35329341318, - 110296.5508982036, - 113879.96407185629, - 94802.89221556886, - 106815.43113772455, - 89954.71856287424, - 90615.25748502994, - 95772.2874251497, - 93685.77245508983, - 102812.8502994012, - 96615.51497005988, - 90639.60479041917, - 119214.33532934132, - 95449.1137724551, - 96891.82035928144, - 100862.59281437125, - 97079.32934131737, - 112066.13772455089, - 118780.31137724551, - 91145.89820359282, - 108381.38323353294, - 107141.36526946108, - 93326.40718562875 - ] - }, - "allocationCount": { - "minimum": 2799.005988023952, - "maximum": 2799.017964071856, - "median": 2799.011976047904, - "coefficientOfVariation": 1.7898967439760305E-6, - "runs": [ - 2799.011976047904, - 2799.017964071856, - 2799.005988023952, - 2799.011976047904, - 2799.005988023952 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 167, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject_2026-04-20-13-18-52.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject-methodTracing-2026-04-20-13-18-52.trace" - } - ] - }, - { - "name": "koinFirstInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 10131511454, - "metrics": { - "timeNs": { - "minimum": 447808.42307692306, - "maximum": 703775.282051282, - "median": 524437.064102564, - "coefficientOfVariation": 0.08200851694007052, - "runs": [ - 691376.8717948718, - 627448.6153846154, - 703775.282051282, - 592267.641025641, - 612511.8846153846, - 556692.1025641026, - 530550.858974359, - 536160.5897435897, - 541366.2051282051, - 525432.7435897436, - 526945.9615384615, - 548207.8205128205, - 565754.5769230769, - 497620.1923076923, - 601020.2948717949, - 554532.641025641, - 538520.2692307692, - 550194.3076923077, - 517230.8461538461, - 612836.5256410256, - 537118.0128205129, - 549811.6282051282, - 525654.358974359, - 588199.0897435897, - 527116.0, - 573196.4871794871, - 539940.5128205129, - 523147.641025641, - 576573.8205128205, - 554037.0128205129, - 478967.0256410256, - 507703.7051282051, - 524464.4358974359, - 522523.42307692306, - 544007.8846153846, - 489443.7948717949, - 549681.5897435897, - 509738.1794871795, - 524409.6923076923, - 530213.6794871795, - 459529.8846153846, - 544424.4230769231, - 499997.3205128205, - 475384.641025641, - 491205.08974358975, - 573159.0769230769, - 536932.4358974359, - 576591.9102564103, - 553166.358974359, - 491979.75641025644, - 496287.39743589744, - 499109.8461538461, - 512025.1794871795, - 478776.6923076923, - 498102.96153846156, - 506816.1794871795, - 477348.58974358975, - 489817.7948717949, - 504487.141025641, - 543116.2564102564, - 545374.5256410256, - 531641.9615384615, - 501585.96153846156, - 463885.5256410256, - 496981.1923076923, - 538074.2435897436, - 532783.0512820513, - 474075.2948717949, - 514029.6923076923, - 476923.73076923075, - 473098.26923076925, - 514129.1794871795, - 544112.4871794871, - 447808.42307692306, - 495412.03846153844, - 488733.28205128206, - 506301.358974359, - 538831.5512820513, - 502738.46153846156, - 513365.9871794872, - 529873.7948717949, - 562413.8717948718, - 562670.3205128205, - 488293.9358974359, - 471368.23076923075, - 508968.91025641025, - 480572.9358974359, - 523548.3717948718, - 516232.0128205128, - 501356.8076923077, - 527037.1794871795, - 479271.4871794872, - 549628.1538461539, - 479592.0256410256, - 524546.6282051282, - 499486.6794871795, - 557148.0897435897, - 502258.2051282051, - 485170.89743589744, - 502651.4871794872 - ] - }, - "allocationCount": { - "minimum": 7987.98717948718, - "maximum": 7988.115384615385, - "median": 7988.051282051282, - "coefficientOfVariation": 5.940527025577358E-6, - "runs": [ - 7988.051282051282, - 7988.0641025641025, - 7988.025641025641, - 7987.98717948718, - 7988.115384615385 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 78, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject_2026-04-20-13-19-02.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject-methodTracing-2026-04-20-13-19-01.trace" - } - ] - }, - { - "name": "stitchRuntimeRepeatedInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 5400449946, - "metrics": { - "timeNs": { - "minimum": 19893.856615709014, - "maximum": 28101.250922509225, - "median": 21034.88508170796, - "coefficientOfVariation": 0.05014571328581919, - "runs": [ - 28101.250922509225, - 22422.849762783342, - 21207.443858724302, - 21297.49815498155, - 22331.42224565103, - 20922.920927780706, - 21197.395361096467, - 21234.871903004743, - 22409.534001054297, - 20927.53347390617, - 21232.345809172377, - 21200.52451238798, - 23179.087506589352, - 20952.189246178175, - 21259.93937796521, - 21306.668423827094, - 22672.806009488668, - 21130.430680021087, - 21192.151291512917, - 21278.526620980494, - 23073.657880864524, - 21279.157617290457, - 21371.738534528202, - 21061.297311544546, - 21752.630469161835, - 20598.340537691092, - 20727.382182393252, - 20798.13494992093, - 22695.45651027939, - 20951.941486557724, - 20660.527675276753, - 20955.09910384818, - 22254.24459673168, - 20467.212440695836, - 19969.661043753295, - 20886.515023721666, - 20685.40221402214, - 22256.44122298366, - 19981.659462308908, - 21017.835529783868, - 20921.713231418027, - 22254.95835529784, - 20017.516605166053, - 20852.277807063783, - 20999.604638903533, - 22767.829731154456, - 19941.21771217712, - 20676.424354243543, - 20930.059567738535, - 22276.373748023194, - 20085.55139694254, - 20568.08434370058, - 21065.442804428043, - 22211.60569319979, - 20161.71375856616, - 20508.14865577227, - 20951.529783869268, - 22337.764891934632, - 20508.560885608855, - 20108.971534001055, - 21039.662098049554, - 22457.113863995783, - 20684.90827622562, - 20036.59831312599, - 21091.60832894043, - 21032.24934106484, - 22053.955719557194, - 19893.856615709014, - 20905.239325250397, - 21088.36847654191, - 22489.4290985767, - 19958.047970479704, - 20868.58618871903, - 20875.5598313126, - 22260.586715867157, - 19906.84290985767, - 21021.047443331576, - 21138.50237216658, - 22930.175013178705, - 20113.36425935688, - 20829.681602530312, - 22172.17975751186, - 21868.438587243014, - 20185.599894570376, - 20811.231418028467, - 21046.9926199262, - 22402.422772799157, - 20328.342119135476, - 20712.66578808645, - 21044.879283078546, - 22214.90089615182, - 20562.813389562467, - 20524.018450184503, - 21012.755930416446, - 21916.128624143385, - 20539.09119662625, - 20484.811280969952, - 21078.78650500791, - 21037.52082235108, - 22081.5487612019 - ] - }, - "allocationCount": { - "minimum": 200.00105429625725, - "maximum": 200.00105429625725, - "median": 200.00105429625725, - "coefficientOfVariation": 0.0, - "runs": [ - 200.00105429625725, - 200.00105429625725, - 200.00105429625725, - 200.00105429625725, - 200.00105429625725 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 1897, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject_2026-04-20-13-19-08.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject-methodTracing-2026-04-20-13-19-08.trace" - } - ] - }, - { - "name": "koinRepeatedInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 6558052081, - "metrics": { - "timeNs": { - "minimum": 113974.71611253197, - "maximum": 159168.39641943734, - "median": 126092.95012787724, - "coefficientOfVariation": 0.05423561377045644, - "runs": [ - 159168.39641943734, - 126293.2915601023, - 121125.452685422, - 123670.34271099744, - 123259.53708439898, - 132875.5063938619, - 126188.19181585677, - 115372.7084398977, - 128566.7084398977, - 122828.35294117648, - 120557.46291560102, - 131095.2148337596, - 120622.86956521739, - 130007.06138107416, - 137009.4040920716, - 128759.32480818414, - 146513.48081841433, - 126121.59079283888, - 126189.25831202047, - 128028.95907928389, - 126653.87979539642, - 124696.42710997442, - 126716.61892583121, - 121382.273657289, - 123232.89769820972, - 126238.67774936062, - 132086.13043478262, - 121436.08695652174, - 133790.89514066497, - 126959.31969309463, - 131772.83375959078, - 131619.37851662404, - 113974.71611253197, - 131789.74936061382, - 120390.15856777494, - 142168.58567774936, - 120210.33248081841, - 122079.73657289002, - 131326.46035805627, - 118825.5294117647, - 124544.57033248081, - 121915.75959079283, - 124948.1841432225, - 119504.60869565218, - 130474.61125319693, - 121420.2378516624, - 143411.25831202045, - 121777.09462915601, - 125903.39897698209, - 126851.95652173914, - 141777.75959079285, - 117326.1662404092, - 126840.90025575447, - 115228.18158567775, - 119794.19948849105, - 126585.01278772378, - 125507.51406649617, - 130264.67774936062, - 127337.88746803069, - 126064.3094629156, - 125355.79028132993, - 124426.41687979539, - 121151.29411764706, - 116895.51406649617, - 123385.15089514067, - 127292.19693094629, - 127427.67007672634, - 124864.13043478261, - 128643.8337595908, - 120044.89002557544, - 120742.48593350383, - 121070.57033248081, - 130680.68030690537, - 120267.20971867007, - 122368.12531969309, - 129729.32480818414, - 120190.35294117648, - 127176.84398976983, - 121100.67519181586, - 132235.98465473147, - 115496.58823529411, - 129901.82608695653, - 121429.5601023018, - 120700.66240409207, - 130894.07416879796, - 133126.73145780052, - 124164.26854219948, - 124669.38363171356, - 136846.36061381074, - 122122.09462915601, - 134351.95652173914, - 128699.38107416879, - 123065.4578005115, - 129287.74936061382, - 128843.37851662404, - 124108.72378516624, - 130538.41432225064, - 130738.49104859335, - 122417.9462915601, - 130852.51662404092 - ] - }, - "allocationCount": { - "minimum": 2399.992327365729, - "maximum": 2400.010230179028, - "median": 2400.005115089514, - "coefficientOfVariation": 2.957038597018961E-6, - "runs": [ - 2400.005115089514, - 2399.997442455243, - 2399.992327365729, - 2400.010230179028, - 2400.005115089514 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 391, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject_2026-04-20-13-19-14.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject-methodTracing-2026-04-20-13-19-14.trace" - } - ] - }, - { - "name": "stitchPrecompiledRepeatedInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1558699531, - "metrics": { - "timeNs": { - "minimum": 1502.0770392749246, - "maximum": 17905.33761329305, - "median": 1589.4069108761328, - "coefficientOfVariation": 0.871369665397263, - "runs": [ - 17905.33761329305, - 5905.321752265861, - 2509.7756797583083, - 2490.165407854985, - 2447.5037764350454, - 2453.7979607250754, - 2487.1759818731116, - 2511.5260574018125, - 2299.8489425981875, - 2184.353096676737, - 2155.75415407855, - 2147.7688821752267, - 2171.0962990936555, - 2159.274924471299, - 2178.62915407855, - 2158.6257552870093, - 2159.8455438066467, - 2177.212990936556, - 2155.1053625377644, - 2185.828172205438, - 2195.760951661631, - 2215.0166163141994, - 2194.816842900302, - 2098.0849697885196, - 2018.3666918429003, - 1907.5128398791542, - 1876.7503776435046, - 1827.184667673716, - 1561.929758308157, - 1559.5498489425981, - 1565.233761329305, - 1533.547583081571, - 1502.0770392749246, - 1520.0740181268882, - 1544.1291540785498, - 1541.9263595166162, - 1545.624244712991, - 1549.0464501510573, - 1522.7881419939577, - 1539.1333081570997, - 1540.8640483383685, - 1531.9342900302115, - 1578.195996978852, - 1533.8621601208458, - 1531.1672960725075, - 1549.9905589123866, - 1571.0755287009063, - 1592.8489425981873, - 1532.1114048338368, - 1540.6083836858006, - 1588.3648036253776, - 1592.94750755287, - 1545.7027945619336, - 1598.5925226586103, - 1594.9535498489427, - 1602.8606495468277, - 1595.2288519637461, - 1594.0883685800604, - 1598.218655589124, - 1589.9184290030212, - 1589.0528700906345, - 1588.3255287009063, - 1597.805513595166, - 1539.5660876132931, - 1594.8753776435046, - 1593.0853474320243, - 1538.1495468277947, - 1581.382175226586, - 1568.9909365558913, - 1529.928247734139, - 1589.6231117824773, - 1588.0698640483383, - 1591.7477341389729, - 1588.3844410876134, - 1589.7809667673716, - 1574.1046072507552, - 1578.6873111782477, - 1558.7235649546828, - 1589.9380664652567, - 1591.334592145015, - 1589.328172205438, - 1594.0098187311178, - 1543.9131419939577, - 1593.0849697885196, - 1585.9256042296072, - 1596.4093655589124, - 1539.9788519637461, - 1589.5449395770393, - 1582.9361782477342, - 1589.4856495468277, - 1586.6729607250754, - 1547.8074018126888, - 1584.6076283987916, - 1581.244335347432, - 1556.2651057401813, - 1562.3232628398791, - 1578.254909365559, - 1552.2526435045318, - 1573.2590634441087, - 1581.2246978851963 - ] - }, - "allocationCount": { - "minimum": 7.552870090634441E-4, - "maximum": 7.552870090634441E-4, - "median": 7.552870090634441E-4, - "coefficientOfVariation": 0.0, - "runs": [ - 7.552870090634441E-4, - 7.552870090634441E-4, - 7.552870090634441E-4, - 7.552870090634441E-4, - 7.552870090634441E-4 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 2648, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject_2026-04-20-13-19-16.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject-methodTracing-2026-04-20-13-19-16.trace" - } - ] - }, - { - "name": "daggerRepeatedInject", - "params": {}, - "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1700290416, - "metrics": { - "timeNs": { - "minimum": 872.777649990416, - "maximum": 5031.667241709795, - "median": 880.954188230784, - "coefficientOfVariation": 0.8057032981047876, - "runs": [ - 5031.667241709795, - 3889.118650565459, - 3881.331416522906, - 3864.0502204331992, - 3878.3565267395056, - 3878.6457734330074, - 3879.1550699635804, - 3882.9687559900326, - 3872.5060379528463, - 3878.8456967605903, - 3881.0619129768065, - 3822.7389304197814, - 1805.3657274295572, - 885.2371094498754, - 876.5813686026452, - 880.5248226950355, - 872.777649990416, - 880.0755223308415, - 874.2453517347134, - 879.4765190722637, - 874.4548591144336, - 875.7028943837455, - 877.6795092965306, - 873.6860264519839, - 884.009009009009, - 877.4100057504313, - 880.6244968372628, - 877.459842821545, - 882.5014376078205, - 881.2436266053287, - 877.2401763465593, - 879.5263561433774, - 877.6296722254169, - 884.7477477477478, - 877.6595744680851, - 883.9589802568526, - 883.6097373969715, - 876.9206440483036, - 883.9091431857389, - 877.459842821545, - 880.7943262411347, - 877.3601686793177, - 885.4366494153728, - 879.7360552041403, - 877.1303431090665, - 880.6346559325283, - 877.2800460034503, - 880.6645581751965, - 877.3502012650949, - 880.814452750623, - 879.875982365344, - 877.6294805443741, - 879.776116542074, - 877.1405022043319, - 879.8560475368986, - 877.1704044470002, - 881.093923710945, - 880.4949204523673, - 877.0904734521756, - 886.5846271803719, - 877.6795092965306, - 879.8757906843014, - 877.0904734521756, - 883.5298064021468, - 884.0289438374544, - 877.0107341383937, - 880.4749856239218, - 877.3300747556067, - 882.7709411539199, - 880.095457159287, - 879.4067471727046, - 880.0856814261069, - 877.4700019168105, - 880.3250910484953, - 877.1905309564884, - 879.636381061913, - 879.7659574468086, - 883.3701360935404, - 885.5464826528656, - 882.7711328349626, - 885.7958596894767, - 882.7811002491853, - 885.3068813494345, - 886.1355184972206, - 882.6013034310906, - 884.5482077822503, - 882.8510638297872, - 888.0024918535557, - 882.9409622388346, - 888.0722637531148, - 886.2951888058271, - 882.8209699060762, - 885.5263561433774, - 882.7410389112516, - 885.2070155261645, - 882.9108683151236, - 891.2070155261645, - 887.9923327582902, - 882.8209699060762, - 886.1554533256661 - ] - }, - "allocationCount": { - "minimum": 3.8336208548974505E-4, - "maximum": 3.8336208548974505E-4, - "median": 3.8336208548974505E-4, - "coefficientOfVariation": 0.0, - "runs": [ - 3.8336208548974505E-4, - 3.8336208548974505E-4, - 3.8336208548974505E-4, - 3.8336208548974505E-4, - 3.8336208548974505E-4 - ] - } - }, - "sampledMetrics": {}, - "warmupIterations": 20, - "repeatIterations": 5217, - "thermalThrottleSleepSeconds": 0, - "profilerOutputs": [ - { - "type": "PerfettoTrace", - "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject_2026-04-20-13-19-18.perfetto-trace" - }, - { - "type": "MethodTrace", - "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject-methodTracing-2026-04-20-13-19-18.trace" - } - ] - } - ] -} \ No newline at end of file diff --git a/docs/benchmarks/injection-performance/injection-performance-25-fixtures.json b/docs/benchmarks/injection-performance/injection-performance-25-fixtures.json new file mode 100644 index 0000000..0c56875 --- /dev/null +++ b/docs/benchmarks/injection-performance/injection-performance-25-fixtures.json @@ -0,0 +1,1187 @@ +{ + "context": { + "build": { + "brand": "samsung", + "device": "e3q", + "fingerprint": "samsung/e3qxxx/e3q:16/BP2A.250605.031.A3/S928BXXS5CZC1:user/release-keys", + "id": "BP2A.250605.031.A3", + "model": "SM-S928B", + "type": "user", + "version": { + "codename": "REL", + "sdk": 36 + } + }, + "cpuCoreCount": 8, + "cpuLocked": false, + "cpuMaxFreqHz": 3398400000, + "memTotalBytes": 11624239104, + "sustainedPerformanceModeEnabled": false, + "artMainlineVersion": 361400140, + "osCodenameAbbreviated": "REL", + "compilationMode": "verify", + "payload": {} + }, + "benchmarks": [ + { + "name": "daggerFactoryInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 2360153124, + "metrics": { + "timeNs": { + "minimum": 307.7711970074813, + "maximum": 893.7118810117563, + "median": 364.259128963306, + "coefficientOfVariation": 0.2846904993640334, + "runs": [ + 893.7118810117563, + 412.80619878874245, + 583.8607944424652, + 380.8401318133238, + 359.42135732098325, + 332.0360705379409, + 337.12121482009263, + 338.3479693623085, + 323.97907018168866, + 328.7476843605273, + 678.3371927324546, + 332.51674385464906, + 335.3404880655504, + 510.44540434627714, + 336.3245457784111, + 329.48655147844676, + 604.7554328464553, + 349.21116850730317, + 327.4780014250089, + 549.1903277520485, + 363.41717135732097, + 333.63359458496615, + 718.5084609903812, + 364.94674029212683, + 349.28865336658356, + 512.3110972568578, + 381.3463662272889, + 700.7390452440328, + 363.5715176344852, + 327.27680798004985, + 316.378874242964, + 550.4514606341289, + 355.4050587816174, + 334.04773779836125, + 737.5604738154614, + 349.00249376558605, + 334.85464909155684, + 501.2901674385465, + 394.4885108656929, + 469.957695048094, + 334.0104203776274, + 325.57864267901675, + 462.8687210545066, + 372.40122907018167, + 361.54390808692557, + 323.21277164232276, + 335.50757035981474, + 491.2170466690417, + 334.9912718204489, + 522.9794264339153, + 348.15274314214463, + 470.8615960099751, + 321.3574100463128, + 387.20555753473457, + 631.40790879943, + 449.1266476665479, + 330.97639828998933, + 455.9485215532597, + 330.0795333095832, + 546.6840042750267, + 338.5098859992875, + 375.1595119344496, + 751.2730673316709, + 473.7909690060563, + 389.78428927680795, + 503.7778767367296, + 330.63234770217315, + 516.2851799073744, + 330.4598325614535, + 336.865871036694, + 603.408888493053, + 335.9595653722836, + 546.1032240826505, + 325.7703954399715, + 331.3727288920556, + 469.5357142857143, + 325.2936408977556, + 450.8927680798005, + 384.5703598147488, + 452.354114713217, + 327.42358389739934, + 461.44638403990024, + 325.23272176701107, + 453.56029568934804, + 334.30610972568576, + 445.9767545422159, + 318.5224438902743, + 431.9902030637692, + 345.1465087281795, + 309.7956002850018, + 492.6699323120769, + 450.3056644104026, + 335.7002137513359, + 320.2817064481653, + 463.889650872818, + 307.7711970074813, + 685.7638047737798, + 466.87451015318845, + 343.45974349839685, + 548.9787139294621 + ] + }, + "allocationCount": { + "minimum": 25.000178126113287, + "maximum": 25.000267189169932, + "median": 25.000178126113287, + "coefficientOfVariation": 1.5931959047905007E-6, + "runs": [ + 25.000267189169932, + 25.000178126113287, + 25.000178126113287, + 25.000178126113287, + 25.000178126113287 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 11228, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject_2026-04-23-12-58-24.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject-methodTracing-2026-04-23-12-58-23.trace" + } + ] + }, + { + "name": "daggerSingletonInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 2562290936, + "metrics": { + "timeNs": { + "minimum": 804.6529921759358, + "maximum": 2670.603827447663, + "median": 898.7347219285261, + "coefficientOfVariation": 0.22237035682306375, + "runs": [ + 2670.603827447663, + 1045.2736307887503, + 1176.8324170014803, + 980.4503066187355, + 1097.2657009938675, + 1111.2100866990907, + 951.1069993656164, + 903.2683442588285, + 1024.296891520406, + 824.7599915415522, + 1107.4254599281032, + 842.3051385070839, + 964.8019665891309, + 820.8950095157538, + 1213.6388242757455, + 868.1011841827025, + 966.4572848382322, + 821.7827236202157, + 991.577500528653, + 811.41351237048, + 826.6909494607739, + 972.8975470501163, + 934.2054345527596, + 810.4068513427786, + 824.5583632903363, + 944.8366462254177, + 811.1492916049905, + 1072.5618524000845, + 818.6251850285472, + 1064.3510255868048, + 815.6682173821104, + 1165.612497356735, + 864.9811799534785, + 970.9513639247198, + 821.8338972298583, + 1010.9707126242334, + 880.4853034468175, + 956.9727215056038, + 812.5268555720025, + 937.6929583421443, + 804.6529921759358, + 823.8227955170227, + 966.6413618101078, + 961.6487629519983, + 817.2119898498626, + 832.1050962148446, + 1018.3910974836117, + 824.016282512159, + 1163.1011841827026, + 894.2010995982238, + 822.0583632903363, + 1082.7882216113344, + 822.7860012687672, + 1139.2056460139565, + 819.3559949249312, + 1064.3919433283993, + 824.7849439627828, + 980.8080989638402, + 815.7484669063227, + 823.513850708395, + 1100.0582575597377, + 817.8436244449143, + 1258.791076337492, + 883.31486572214, + 1042.7192852611545, + 825.5426094311694, + 1148.1609219708184, + 879.7141044618312, + 1016.0499048424614, + 881.3626559526327, + 1040.293508141256, + 882.7976316345951, + 832.7137872700359, + 1025.7902304927045, + 824.2737365193487, + 967.9887925565658, + 814.6701205328823, + 827.1874603510256, + 1077.4033622330303, + 828.5634383590611, + 1245.0140621695919, + 863.5831042503701, + 851.883379149926, + 1005.929794882639, + 1209.1935927257348, + 842.0286529921759, + 1011.4406851342778, + 815.5080355254811, + 1035.6165151194755, + 879.5995982237259, + 827.4665891308945, + 1062.9661662085007, + 824.9181645168112, + 982.6378727003595, + 822.1013956438993, + 814.7279551702262, + 1068.4444914358214, + 972.2957284838233, + 817.1148234299006, + 825.2678156058363 + ] + }, + "allocationCount": { + "minimum": 25.000105730598435, + "maximum": 25.00021146119687, + "median": 25.00021146119687, + "coefficientOfVariation": 2.3164256765547027E-6, + "runs": [ + 25.00021146119687, + 25.00021146119687, + 25.000105730598435, + 25.00021146119687, + 25.000105730598435 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 9458, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject_2026-04-23-12-58-26.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject-methodTracing-2026-04-23-12-58-26.trace" + } + ] + }, + { + "name": "stitchPrecompiledSingletonInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 2188871510, + "metrics": { + "timeNs": { + "minimum": 763.6930693069307, + "maximum": 2251.299092409241, + "median": 814.5362348734874, + "coefficientOfVariation": 0.22261039418792739, + "runs": [ + 2251.299092409241, + 841.6485148514852, + 844.2678767876788, + 957.8721122112212, + 978.9731848184819, + 933.3320957095709, + 782.7193344334434, + 763.6930693069307, + 800.6545654565457, + 800.5706820682068, + 765.6490649064906, + 808.4588833883388, + 1082.171617161716, + 811.6509900990098, + 797.8809130913091, + 1262.7549504950496, + 852.3538228822882, + 789.3333333333334, + 856.187706270627, + 987.9294554455446, + 799.7176842684269, + 1090.2596259625961, + 804.5105885588558, + 786.6487898789879, + 793.2920792079208, + 1046.975110011001, + 795.3234323432343, + 1274.245187018702, + 869.1221122112212, + 781.7183718371837, + 798.2348734873488, + 1200.6211496149615, + 814.3737623762377, + 806.3074807480748, + 1290.5346534653465, + 797.2739273927393, + 795.2469746974698, + 1067.000412541254, + 792.7901540154015, + 795.4836358635864, + 1353.2409240924092, + 814.9143289328933, + 797.8066556655666, + 1076.0896589658967, + 814.317794279428, + 796.3798129812981, + 1000.2548129812981, + 801.5415291529152, + 789.0015126512651, + 796.393701870187, + 1096.632288228823, + 820.2625137513751, + 785.1043729372938, + 1288.830308030803, + 801.2693894389439, + 788.4568206820682, + 1071.7835533553355, + 857.2484873487349, + 778.2953795379537, + 1321.0059130913091, + 850.5063256325633, + 798.5374037403741, + 859.3301705170517, + 1027.407590759076, + 785.1467271727173, + 862.0275027502751, + 1047.5181518151815, + 786.19499449945, + 806.460396039604, + 1059.5416666666667, + 815.0343784378438, + 790.1193619361936, + 1117.7758525852585, + 865.5818206820682, + 801.6346259625963, + 797.7652640264026, + 1059.7919416941695, + 796.8114686468647, + 1100.679317931793, + 864.1133113311331, + 788.8433718371837, + 809.9748349834983, + 1082.4916116611662, + 901.7692519251925, + 793.1595159515952, + 1071.1628162816282, + 784.8349834983499, + 801.869499449945, + 790.698294829483, + 1057.4573707370737, + 788.8722497249724, + 795.3341584158416, + 1141.5668316831684, + 815.0918591859186, + 793.0548679867986, + 1091.291804180418, + 815.5034378437844, + 812.8653740374037, + 1088.594196919692, + 814.6987073707371 + ] + }, + "allocationCount": { + "minimum": 25.00027502750275, + "maximum": 25.00027502750275, + "median": 25.00027502750275, + "coefficientOfVariation": 0.0, + "runs": [ + 25.00027502750275, + 25.00027502750275, + 25.00027502750275, + 25.00027502750275, + 25.00027502750275 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 7272, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject_2026-04-23-12-58-29.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject-methodTracing-2026-04-23-12-58-28.trace" + } + ] + }, + { + "name": "koinFactoryInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 5269495780, + "metrics": { + "timeNs": { + "minimum": 34139.08382642998, + "maximum": 54751.60256410256, + "median": 37597.6691321499, + "coefficientOfVariation": 0.06321856843739393, + "runs": [ + 54751.60256410256, + 41810.64102564102, + 41214.50788954635, + 36231.30276134122, + 38546.13510848126, + 36224.42110453649, + 36998.89053254438, + 38706.237672583826, + 37131.15285996055, + 36422.84023668639, + 35974.37968441815, + 36852.65680473373, + 38935.37278106509, + 37328.54635108481, + 39212.89447731755, + 38872.503944773176, + 36206.90532544379, + 37919.95364891519, + 35954.80966469428, + 36964.168639053256, + 38643.77810650888, + 39843.08185404339, + 34913.04043392505, + 39949.04635108481, + 38555.68934911243, + 36183.68836291913, + 36770.52465483235, + 37985.34122287969, + 39398.9358974359, + 34139.08382642998, + 39798.75443786982, + 38095.414201183434, + 39787.50591715976, + 36639.08382642998, + 39871.17850098619, + 39021.71696252465, + 38643.984220907296, + 40031.331360946744, + 36126.87968441815, + 39765.572978303746, + 40128.92504930966, + 38877.434911242606, + 39952.4358974359, + 36696.97238658777, + 35758.39250493097, + 35682.42504930966, + 39458.67258382643, + 37720.660749506904, + 38714.76429980276, + 39991.57593688363, + 35241.87376725838, + 40475.889546351085, + 38776.503944773176, + 38886.320512820515, + 36824.71400394478, + 35665.577909270214, + 36759.99506903353, + 35894.45660749507, + 37302.19625246548, + 40280.293885601575, + 35259.59467455621, + 37504.10946745562, + 35942.07100591716, + 37602.26627218935, + 37593.071992110454, + 38198.55325443787, + 38465.85305719921, + 37209.12426035503, + 35524.48027613412, + 35299.863905325445, + 39180.997041420116, + 37005.67061143984, + 38136.91617357002, + 37160.32741617357, + 35803.69625246548, + 35813.40433925049, + 35973.9684418146, + 37674.072978303746, + 37103.673570019724, + 41619.103550295855, + 38190.33530571992, + 36360.68934911243, + 35144.9506903353, + 38160.59566074951, + 35553.193293885604, + 38219.50986193294, + 36183.68934911243, + 39629.97238658777, + 36788.86193293885, + 38384.13313609467, + 35652.01775147929, + 37120.88067061144, + 37060.887573964494, + 38190.54043392505, + 36140.54240631164, + 39043.90631163708, + 40079.66568047337, + 36104.895463510846, + 39474.85207100592, + 35462.58678500986 + ] + }, + "allocationCount": { + "minimum": 625.0019723865878, + "maximum": 625.008875739645, + "median": 625.0019723865878, + "coefficientOfVariation": 4.786007086044712E-6, + "runs": [ + 625.0019723865878, + 625.0019723865878, + 625.008875739645, + 625.0019723865878, + 625.0039447731756 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 1014, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject_2026-04-23-12-58-34.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject-methodTracing-2026-04-23-12-58-33.trace" + } + ] + }, + { + "name": "stitchRuntimeSingletonInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 2512079791, + "metrics": { + "timeNs": { + "minimum": 1738.2601270289344, + "maximum": 3271.2376852505295, + "median": 1945.5238532110093, + "coefficientOfVariation": 0.09299253812093414, + "runs": [ + 3271.2376852505295, + 2556.3617501764293, + 2050.318983768525, + 1893.0913196894849, + 2045.0261115031758, + 1918.614820042343, + 1840.8831333803812, + 1791.31376146789, + 2264.9891319689486, + 1967.9633027522937, + 1790.0788990825688, + 1738.2601270289344, + 1746.7655610444601, + 2138.085109386027, + 1923.4592801693718, + 1822.240366972477, + 1885.8798870853916, + 2113.3776993648553, + 1887.32067748765, + 1890.2097388849681, + 1884.4756527875793, + 2123.059280169372, + 1910.4622441778406, + 1879.425546930134, + 1873.779675370501, + 1856.8573041637262, + 2120.8097388849683, + 1884.4462949894144, + 1885.2182074805928, + 1881.9909668313337, + 2172.9078334509527, + 1927.1863091037403, + 1899.9793930839803, + 1891.3270289343684, + 1857.3864502470008, + 2154.1107974594215, + 1860.5621736062103, + 1922.5256175017644, + 1911.1311220889202, + 2279.4196189131967, + 1982.3129146083274, + 1946.292025405787, + 1946.1155963302751, + 2098.4474241354974, + 1965.9123500352857, + 1910.1755822159491, + 1911.4399435426958, + 1886.725194071983, + 2255.6971065631615, + 1949.725194071983, + 1963.5452364149612, + 1911.4913196894847, + 2152.949329569513, + 1953.2242766407903, + 1949.8794636556104, + 1959.8256880733945, + 1975.9909668313337, + 2268.7088214537757, + 1945.13789696542, + 1915.666901905434, + 1887.8719830628088, + 2139.4158080451657, + 1952.114184897671, + 1962.0897671136204, + 1957.877628793225, + 2303.5167254763587, + 1976.9760056457303, + 1945.9098094565984, + 1954.6650670430488, + 1880.8221594918843, + 2120.082004234298, + 1936.764855328158, + 1932.7511644318984, + 1903.4711362032463, + 2084.9652787579394, + 1871.6256880733945, + 1955.8485532815807, + 1934.4197600564573, + 1893.5030345800988, + 2225.983486238532, + 1948.6002822865207, + 1929.1270289343684, + 1930.376570218772, + 2108.1215243472125, + 1963.5378969654198, + 1946.983062808751, + 1927.825829216655, + 1919.3645730416372, + 2229.42399435427, + 1971.477205363444, + 1955.4664784756528, + 1954.326887791108, + 2124.1546930134086, + 1924.9956245589274, + 1944.9467889908258, + 1891.2094565984473, + 1908.3083980239944, + 2125.0, + 1933.6920254057868, + 1960.4798870853917 + ] + }, + "allocationCount": { + "minimum": 50.00028228652082, + "maximum": 50.00028228652082, + "median": 50.00028228652082, + "coefficientOfVariation": 0.0, + "runs": [ + 50.00028228652082, + 50.00028228652082, + 50.00028228652082, + 50.00028228652082, + 50.00028228652082 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 7085, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject_2026-04-23-12-58-36.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject-methodTracing-2026-04-23-12-58-36.trace" + } + ] + }, + { + "name": "koinSingletonInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 4819438592, + "metrics": { + "timeNs": { + "minimum": 15881.644085461177, + "maximum": 27121.65659197499, + "median": 17511.955445544554, + "coefficientOfVariation": 0.06885564048658323, + "runs": [ + 27121.65659197499, + 18420.292860865033, + 17389.129755080772, + 18421.052631578947, + 17496.44450234497, + 16796.671182907765, + 17540.792600312663, + 18725.762897342367, + 18141.013027618552, + 16487.645648775404, + 17603.569567483064, + 19103.265242313704, + 18710.75403856175, + 18574.50703491402, + 17522.47264200104, + 17492.29181865555, + 18906.54872329338, + 17191.001042209486, + 19216.03543512246, + 17950.782699322564, + 17411.955184992185, + 18083.013027618552, + 17212.19801980198, + 18344.053673788432, + 17777.027097446586, + 18567.368942157373, + 17600.58415841584, + 16817.949973944764, + 17625.74361646691, + 16739.485669619593, + 17577.75820739969, + 18294.033350703492, + 17137.072433559144, + 18506.980719124545, + 17439.6654507556, + 16849.623241271496, + 17295.031787389264, + 16805.65502866076, + 18610.79468473163, + 17081.48775403856, + 17908.877019280877, + 18177.110474205314, + 16822.346534653465, + 18181.724335591454, + 17624.41375716519, + 17324.56122980719, + 16736.717040125066, + 17365.65242313705, + 18398.715476810838, + 16738.671182907765, + 16873.91401771756, + 17413.610734757687, + 18681.44189682126, + 17105.914538822304, + 17208.371547681083, + 16487.075560187597, + 17645.719124544034, + 17821.564877540386, + 17161.118811881188, + 19210.716519020323, + 17431.98488796248, + 17441.91870766024, + 17279.58884835852, + 18268.412193850963, + 17498.67014069828, + 16802.534132360604, + 17328.632621156852, + 16700.348619072432, + 17324.859822824386, + 18288.79468473163, + 17901.196456487753, + 15994.550286607608, + 18201.319958311622, + 16021.500781657112, + 18769.867118290775, + 18006.44867118291, + 17197.053673788432, + 18047.132881709225, + 18411.98749348619, + 17277.20062532569, + 16723.852527357998, + 17837.768108389788, + 17501.438249088067, + 17462.681605002606, + 18183.73267326733, + 17404.24700364773, + 17006.008858780617, + 17157.807712350183, + 17237.87337154768, + 17851.854611776966, + 20058.949973944764, + 17528.307972902552, + 17881.790515893696, + 16683.249609171442, + 17245.961438249087, + 19103.59145388223, + 16907.3246482543, + 19042.686816050027, + 18243.904116727463, + 15881.644085461177 + ] + }, + "allocationCount": { + "minimum": 299.9968733715477, + "maximum": 300.0031266284523, + "median": 300.00156331422613, + "coefficientOfVariation": 7.997796382232051E-6, + "runs": [ + 300.0020844189682, + 300.00156331422613, + 300.0010422094841, + 299.9968733715477, + 300.0031266284523 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 1919, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject_2026-04-23-12-58-41.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject-methodTracing-2026-04-23-12-58-41.trace" + } + ] + }, + { + "name": "stitchPrecompiledFactoryInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 3091653749, + "metrics": { + "timeNs": { + "minimum": 312.4797179986321, + "maximum": 680.8799389698532, + "median": 399.93215657389385, + "coefficientOfVariation": 0.2130751562570221, + "runs": [ + 680.8799389698532, + 433.9322881043826, + 362.47045825222284, + 488.4430999105593, + 313.02925238070185, + 387.1551533645499, + 549.4282106592308, + 380.4775608986163, + 386.9421791971379, + 335.9751670437207, + 426.5414321039617, + 399.7504077445152, + 556.0158888830431, + 389.1436312937339, + 320.8983532382806, + 522.3616562319146, + 383.8320092597464, + 438.3883306150366, + 314.7720313568685, + 469.7474614615668, + 453.8780975430105, + 342.6213500289367, + 330.7314673541327, + 466.7020045246488, + 320.5047087914979, + 566.8955121797233, + 414.0084179512811, + 436.53354027463564, + 358.2571684116378, + 408.0337770295154, + 412.86941653075183, + 390.83769137686113, + 327.43962750565584, + 428.8609459672752, + 451.9588572631136, + 317.95101804598306, + 423.9873204608828, + 316.9910559267638, + 488.9610143631294, + 312.4797179986321, + 519.2757405166518, + 325.53906455516386, + 467.7521439469669, + 558.3125164413111, + 376.0152049245015, + 411.003525017099, + 443.175198611038, + 319.6562845267533, + 539.8447414110591, + 336.83358762561164, + 597.155995159678, + 411.0005261219551, + 400.41726732256535, + 318.5812069237649, + 447.6783816488662, + 321.08560004208977, + 613.4127952859473, + 465.8002841058557, + 368.60104172147106, + 455.349660651339, + 323.77881833008894, + 517.2538538433208, + 329.76135108118063, + 549.8808333771768, + 331.8480033671805, + 464.5117588256958, + 462.93191981901407, + 345.05482190771824, + 319.96701215341716, + 484.31441048034935, + 475.22381227968646, + 357.8804650918083, + 316.6815909927921, + 540.9103488188562, + 325.3597095806808, + 596.1989793234071, + 317.197611406324, + 476.6859578050192, + 345.661756195086, + 508.19666438680485, + 394.48992476456044, + 393.1566791182196, + 314.2949965802073, + 466.03319829536485, + 322.0975956226653, + 625.1146945862051, + 453.91213763350345, + 341.03019940022097, + 627.5536907455148, + 400.1139054032725, + 395.67696111958753, + 316.09754301046985, + 490.99216078286946, + 387.82701110117324, + 395.8696795917294, + 316.0033145683169, + 440.2495396432893, + 399.33403482927343, + 314.94791392644817, + 325.3561319513863 + ] + }, + "allocationCount": { + "minimum": 25.000105224391014, + "maximum": 25.00015783658652, + "median": 25.000105224391014, + "coefficientOfVariation": 9.411512073806692E-7, + "runs": [ + 25.000105224391014, + 25.00015783658652, + 25.000105224391014, + 25.000105224391014, + 25.000105224391014 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 19007, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject_2026-04-23-12-58-44.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject-methodTracing-2026-04-23-12-58-44.trace" + } + ] + }, + { + "name": "stitchRuntimeFactoryInject", + "params": {}, + "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", + "totalRunTimeNs": 1801032343, + "metrics": { + "timeNs": { + "minimum": 3435.8017103153393, + "maximum": 16376.492250133619, + "median": 3853.40085515767, + "coefficientOfVariation": 0.3268035579114861, + "runs": [ + 16376.492250133619, + 4897.391769107429, + 4588.733832175308, + 4342.819882415821, + 4388.277926242651, + 6103.3816141101015, + 4623.669160876537, + 4447.84981293426, + 4228.242116515233, + 5411.154997327632, + 4716.478353821486, + 4148.071619454837, + 4162.073222875468, + 4987.556921432389, + 4164.690539818279, + 4100.21913415286, + 4130.8401924104755, + 4244.9727418492785, + 4272.308925708177, + 4196.78674505612, + 5594.267771245323, + 4557.695350080171, + 4083.600748262961, + 4051.1704970603955, + 5077.247995724211, + 4016.513094601817, + 3970.4147514698025, + 3950.6782469267773, + 4066.981827899519, + 4025.0309994655263, + 4977.925173703901, + 3889.742383752004, + 3779.229289150187, + 3790.9203634420096, + 3906.1940138963123, + 4901.261357562801, + 3677.1779796900055, + 3577.0475681453768, + 3709.3853554249063, + 3750.2784607161943, + 3690.4836985569214, + 5155.860502405131, + 3698.9465526456443, + 3573.846606092998, + 3704.1801175841797, + 4079.592196686264, + 4504.748797434527, + 3597.1181186531267, + 3537.296098343132, + 3706.3233564938537, + 4928.152324959914, + 3655.492784607162, + 3616.4094067343667, + 3616.0475681453768, + 3737.2784607161943, + 5376.664885088188, + 3993.7696419027257, + 3842.7530732228756, + 3671.6386958845537, + 3700.672367717798, + 4739.360769641903, + 3864.048637092464, + 3587.8765366114376, + 3629.3260288615716, + 3707.520577231427, + 5123.763762693747, + 3754.453768038482, + 3718.7386424371994, + 3604.2164617851417, + 4402.1411010155, + 3435.8017103153393, + 3461.9690005344737, + 3484.7952966328166, + 3506.2298236237307, + 4573.145376803848, + 3515.7776590058793, + 3522.8209513629076, + 3528.9727418492785, + 3525.966328166756, + 4738.664885088188, + 3481.6499198289685, + 3534.0112239444147, + 3524.5745590593265, + 3495.2896846606095, + 4803.719935863175, + 3709.9700694815606, + 3456.735435595938, + 3497.990379476216, + 3599.6237306253342, + 3576.5467664350613, + 4936.420096205238, + 3538.8829502939607, + 3511.101549973276, + 3465.3372528059863, + 3511.825227151256, + 5641.618920363442, + 3645.7215392838057, + 3440.0331373597005, + 3532.3687867450562, + 4475.631747728487 + ] + }, + "allocationCount": { + "minimum": 110.00106894708712, + "maximum": 110.00213789417424, + "median": 110.00106894708712, + "coefficientOfVariation": 4.3458372333276305E-6, + "runs": [ + 110.00106894708712, + 110.00106894708712, + 110.00106894708712, + 110.00106894708712, + 110.00213789417424 + ] + } + }, + "sampledMetrics": {}, + "warmupIterations": 20, + "repeatIterations": 1871, + "thermalThrottleSleepSeconds": 0, + "profilerOutputs": [ + { + "type": "PerfettoTrace", + "label": "Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject_2026-04-23-12-58-46.perfetto-trace" + }, + { + "type": "MethodTrace", + "label": "Method Trace", + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject-methodTracing-2026-04-23-12-58-46.trace" + } + ] + } + ] +} \ No newline at end of file diff --git a/docs/benchmarks/injection-performance/injection-performance-50-fixtures.json b/docs/benchmarks/injection-performance/injection-performance-50-fixtures.json index 1c40139..221f67d 100644 --- a/docs/benchmarks/injection-performance/injection-performance-50-fixtures.json +++ b/docs/benchmarks/injection-performance/injection-performance-50-fixtures.json @@ -24,1162 +24,1162 @@ }, "benchmarks": [ { - "name": "stitchPrecompiledFirstInject", + "name": "daggerFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2160447812, + "totalRunTimeNs": 2424696874, "metrics": { "timeNs": { - "minimum": 1508.7317148125385, - "maximum": 6718.899200983405, - "median": 1570.2997848801474, - "coefficientOfVariation": 0.3164602815432916, + "minimum": 538.9468613578202, + "maximum": 1877.447087159416, + "median": 696.037708866476, + "coefficientOfVariation": 0.2540687852504251, "runs": [ - 6718.899200983405, - 1703.1760909649663, - 1700.3488014751076, - 1725.2762753534112, - 1701.4935464044254, - 2049.0159803318993, - 1717.4539028887523, - 1710.761831591887, - 2020.9339274738784, - 1710.283036263061, - 2129.8773816840812, - 1581.7882606023356, - 1520.0510141364475, - 1549.3644744929318, - 1871.8300553165334, - 1538.939459127228, - 1523.7314074984633, - 1751.559618930547, - 1603.3952059004303, - 1510.319606637984, - 1548.3927473878305, - 1681.9496004917025, - 1657.0104486785494, - 1537.7080516287647, - 1560.178856791641, - 2473.1425937307927, - 1841.917947141979, - 1560.4680393362016, - 1531.2126613398893, - 2203.247695144438, - 1538.8106945298096, - 1998.2274124154885, - 1654.3420405654579, - 1532.4449907805777, - 1551.857713583282, - 1530.1542716656422, - 2178.519360786724, - 1560.2455439459127, - 1541.121696373694, - 2413.09803318992, - 1688.3285187461586, - 1552.8122311001844, - 1552.6410571604179, - 1538.80024585126, - 2394.457590657652, - 1604.721573448064, - 1565.1094038106946, - 2254.9302397049787, - 1617.5928088506453, - 1564.260295021512, - 1666.7335586969882, - 1961.8847572218808, - 1534.682544560541, - 1550.0983405039951, - 2221.618930547019, - 1568.4496004917025, - 1546.4102642901046, - 2044.5691456668715, - 1573.2704363859864, - 1538.7950215119852, - 1921.8036263060849, - 1608.7732022126613, - 1562.4717271051013, - 1542.939459127228, - 2168.9748002458514, - 1555.3444990780579, - 1555.858328211432, - 1616.6462814996926, - 2162.445912722803, - 1557.8730792870313, - 1557.541180086048, - 1935.5132145052244, - 1556.5341118623232, - 1539.3054701905348, - 1983.6960663798402, - 1653.1336816226183, - 1521.8149969268593, - 1537.3119237861094, - 1981.859250153657, - 1546.4161032575291, - 1534.2006760909649, - 1971.1933005531653, - 1549.1349108789182, - 1536.9459127228026, - 1554.9287031346037, - 1508.7317148125385, - 2214.3331284572832, - 1575.7363245236631, - 1538.1029502151198, - 2065.4508297480024, - 1549.8973570989551, - 1540.8189920098341, - 1554.2627535341119, - 1994.1256914566686, - 1546.0934234787953, - 1531.9370006146282, - 2098.421327596804, - 1572.1499692685925, - 1539.055931161647, - 1533.0497848801474 + 1877.447087159416, + 823.8225199458076, + 832.0152039741081, + 637.6847809724522, + 688.4318831853078, + 702.5167845852777, + 708.972602739726, + 857.8380249887099, + 713.400572030709, + 654.5851272015656, + 647.7072105976216, + 612.5730844497967, + 827.4806563299715, + 596.2964022279091, + 1169.065934065934, + 853.8506698780672, + 597.3405088062623, + 913.1478247779618, + 872.8712930904712, + 657.8511214812585, + 933.2857142857143, + 579.4982688544333, + 870.4606352551558, + 588.4476892970043, + 856.6150835465904, + 593.0111395453861, + 887.5523107029957, + 596.2638867981334, + 687.6012343820563, + 755.474634954087, + 769.5321390937829, + 798.0800842992624, + 576.8282402528978, + 899.3420141502334, + 590.2492849616137, + 951.7583922926389, + 621.9470118922173, + 927.2340809875056, + 605.8136384163781, + 927.5666114707211, + 646.8297455968689, + 821.0237844347433, + 794.8755080535902, + 577.2652416077074, + 689.5586331476743, + 595.2283606804154, + 675.9111847057053, + 1306.250940839982, + 803.6339003462291, + 590.6986301369863, + 840.7129309047117, + 605.4728285413217, + 921.8735511064278, + 578.9430979978926, + 1088.7349089266897, + 612.698329068192, + 972.6609965377089, + 661.1711576095138, + 1006.2541020623213, + 655.9479150986, + 589.0435044407648, + 567.5622459732049, + 706.0338702393497, + 589.4576245672137, + 895.7845852777359, + 584.8773144663555, + 577.8890561493301, + 838.6567815745898, + 588.5532139093783, + 856.1053740779768, + 591.7203070901701, + 622.7808219178082, + 744.5532139093783, + 825.0401926840283, + 590.6179437001355, + 583.5235586331477, + 845.187866927593, + 780.3227457474032, + 591.4467860906217, + 571.0873099503236, + 824.5223543579708, + 642.3385518590998, + 833.3853680566009, + 896.3948517236189, + 658.4931506849315, + 939.648803251543, + 599.0081288574439, + 895.2836068041547, + 621.038386271263, + 816.5837723919916, + 589.5926539214211, + 598.9303025741382, + 859.1639319584525, + 671.0773746801144, + 799.9161523408098, + 585.4175824175824, + 882.8073159716995, + 565.2512419087761, + 538.9468613578202, + 973.9047117266296 ] }, "allocationCount": { - "minimum": 50.00061462814997, - "maximum": 50.000921942224956, - "median": 50.00061462814997, - "coefficientOfVariation": 2.748663481528324E-6, + "minimum": 50.00030106879422, + "maximum": 50.00030106879422, + "median": 50.00030106879422, + "coefficientOfVariation": 0.0, "runs": [ - 50.00061462814997, - 50.00061462814997, - 50.00061462814997, - 50.00061462814997, - 50.000921942224956 + 50.00030106879422, + 50.00030106879422, + 50.00030106879422, + 50.00030106879422, + 50.00030106879422 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 3254, + "repeatIterations": 6643, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject_2026-04-20-13-14-58.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject_2026-04-23-12-59-54.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFirstInject-methodTracing-2026-04-20-13-14-58.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerFactoryInject-methodTracing-2026-04-23-12-59-54.trace" } ] }, { - "name": "daggerFirstInject", + "name": "daggerSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1898209530, + "totalRunTimeNs": 2580733020, "metrics": { "timeNs": { - "minimum": 1550.6741167988464, - "maximum": 7394.1164383561645, - "median": 1763.7602739726026, - "coefficientOfVariation": 0.33767295417806353, + "minimum": 1581.9548698572628, + "maximum": 6645.273509655752, + "median": 1806.241813602015, + "coefficientOfVariation": 0.28818587935593115, "runs": [ - 7394.1164383561645, - 2328.632299927902, - 2011.1629416005767, - 2041.2901946647441, - 2367.0803893294883, - 2006.0018024513338, - 2443.014780100937, - 1961.7516222062004, - 1945.645638067772, - 1938.77505407354, - 2412.1009372746935, - 1900.771809661139, - 1919.2209805335256, - 1890.3139870223504, - 2382.566690699351, - 1949.6921413121845, - 1892.4823359769287, - 2371.1950252343186, - 1918.6874549387167, - 1866.1189617880318, - 1870.6802451333815, - 2040.0194664744051, - 1945.3017303532804, - 1831.1589762076424, - 1796.1459985580389, - 2607.1070656092284, - 1835.3590483056958, - 1680.3943763518384, - 1639.717375630858, - 2522.4736842105262, - 1770.6481614996394, - 1660.926820475847, - 2462.416005767844, - 1786.9055515501082, - 1620.0072098053352, - 1633.0674116798846, - 2326.185291997116, - 1645.9242970439798, - 1614.0266762797405, - 1643.2682047584715, - 2672.246214852199, - 1781.7653208363374, - 2377.1467195385726, - 1670.98774333093, - 1603.630497476568, - 1621.2108868060561, - 2798.1178803172315, - 1679.7465753424658, - 1577.4981975486662, - 1561.0551550108148, - 2321.9066330209084, - 1604.8514780100936, - 1595.7545061283345, - 2906.5180245133383, - 1736.8651766402306, - 1573.4960346070657, - 2248.390410958904, - 1598.1474405191059, - 1591.4069935111752, - 2043.6445565969718, - 1631.6474405191059, - 1613.4293439077144, - 1577.3482335976928, - 2157.501802451334, - 1652.3677000720982, - 1564.232516222062, - 1580.296322999279, - 2204.612833453497, - 1566.8280461427541, - 1573.0039653929343, - 1555.4538572458544, - 2219.376712328767, - 1568.706560922855, - 1564.4008651766403, - 2144.5389329488103, - 1565.317591925018, - 1574.786950252343, - 1577.8035328046142, - 2645.908435472242, - 1676.0865176640232, - 1570.3597692862293, - 1550.6741167988464, - 2779.071016582552, - 1620.111031002163, - 1591.9902667627973, - 1704.0054073540014, - 2189.185652487383, - 1600.4015861571738, - 1696.2029560201875, - 2052.291276135544, - 1568.1586157173756, - 1577.4023071377073, - 1579.7076423936553, - 2549.3093006488825, - 1756.872386445566, - 1586.9495313626533, - 1562.667267483778, - 2691.5457822638787, - 1593.2988464311463, - 1577.9426820475846 + 6645.273509655752, + 2179.7361460957177, + 2351.1477749790092, + 2261.826406381192, + 2076.8333333333335, + 2771.2732997481107, + 2103.589420654912, + 2357.168765743073, + 2613.328295549958, + 2772.7172544080604, + 2264.015113350126, + 2312.2439126784216, + 2390.7054995801846, + 1934.4899244332494, + 2483.2886230058775, + 1696.7149454240134, + 2186.724601175483, + 1728.295340050378, + 2082.798908480269, + 1687.5520570948784, + 1703.158270361041, + 2192.2283795130143, + 1662.7258606213265, + 2415.1053736356002, + 1738.2550377833754, + 2227.325356842989, + 1748.1064231738035, + 2152.291771620487, + 1720.1349706129304, + 1688.7831654072208, + 2065.5119647355164, + 1588.310243492863, + 2163.0050377833754, + 1633.6127204030226, + 1590.3620906801007, + 2147.1563811922756, + 1618.4846767422334, + 2052.2659529806883, + 1636.0724181360201, + 1982.4221242653232, + 1649.2560873215784, + 2187.1633081444165, + 1845.0146935348446, + 1591.9151973131823, + 2041.25, + 1599.629932829555, + 1991.6446263643998, + 1599.7086481947943, + 1587.7800167926111, + 2118.6616288832915, + 1598.2271200671705, + 2211.100335852225, + 1674.129932829555, + 1600.6507136859782, + 2107.2810663308146, + 1605.408900083963, + 2166.032535684299, + 1671.4800587741395, + 1604.1784214945424, + 2090.584172963896, + 1597.5119647355164, + 2110.8129722921913, + 1600.1267842149455, + 1600.8362720403022, + 2104.9433249370277, + 1632.695004198153, + 2104.169395465995, + 1756.9557094878253, + 1618.1211167086483, + 1693.852644836272, + 1585.3971452560872, + 2158.6221662468515, + 1688.2445424013433, + 1591.8182199832074, + 2038.9601175482787, + 1594.327036104114, + 2479.1880772460117, + 1606.850335852225, + 2177.899034424853, + 1593.1110411418977, + 2119.2078085642315, + 1767.4689336691856, + 1598.663518052057, + 2090.573677581864, + 1604.8916876574308, + 1924.9492023509656, + 1581.9548698572628, + 1622.3192695214107, + 2163.7712006717043, + 1594.345717884131, + 2382.4103694374476, + 1747.3900083963056, + 1611.9580184718723, + 2238.7218723761544, + 1591.6494542401344, + 2074.3140218303947, + 1684.0176322418135, + 1683.1821998320738, + 1997.056255247691, + 1596.2514693534845 ] }, "allocationCount": { - "minimum": 50.000360490266765, - "maximum": 50.00072098053352, - "median": 50.00072098053352, - "coefficientOfVariation": 3.224281123197032E-6, + "minimum": 50.000419815281276, + "maximum": 50.000419815281276, + "median": 50.000419815281276, + "coefficientOfVariation": 0.0, "runs": [ - 50.00072098053352, - 50.00072098053352, - 50.00072098053352, - 50.00072098053352, - 50.000360490266765 + 50.000419815281276, + 50.000419815281276, + 50.000419815281276, + 50.000419815281276, + 50.000419815281276 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 2774, + "repeatIterations": 4764, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject_2026-04-20-13-15-00.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject_2026-04-23-12-59-56.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerFirstInject-methodTracing-2026-04-20-13-15-00.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_daggerSingletonInject-methodTracing-2026-04-23-12-59-56.trace" } ] }, { - "name": "stitchRuntimeFirstInject", + "name": "stitchPrecompiledSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2763977030, + "totalRunTimeNs": 2328820988, "metrics": { "timeNs": { - "minimum": 22766.909090909092, - "maximum": 56653.150649350646, - "median": 25735.46883116883, - "coefficientOfVariation": 0.16048326469377877, + "minimum": 1518.8723623262995, + "maximum": 6008.644364384972, + "median": 1634.5961142563046, + "coefficientOfVariation": 0.28418464825622025, "runs": [ - 56653.150649350646, - 32298.267532467533, - 31212.205194805196, - 33257.44675324675, - 25911.01038961039, - 32661.52727272727, - 25287.625974025974, - 30865.225974025972, - 31081.83116883117, - 28545.137662337664, - 23876.371428571427, - 25180.753246753247, - 31642.98181818182, - 26155.174025974025, - 29926.145454545454, - 23882.833766233765, - 34525.168831168834, - 25719.98961038961, - 28049.935064935064, - 28316.14285714286, - 26214.83896103896, - 29303.97142857143, - 24100.415584415583, - 31716.054545454546, - 24839.82077922078, - 31488.914285714287, - 23890.976623376624, - 26343.32987012987, - 28798.153246753245, - 24554.916883116883, - 30473.363636363636, - 23942.636363636364, - 28707.425974025973, - 23282.45194805195, - 31572.755844155843, - 25556.919480519482, - 25290.742857142857, - 28051.01038961039, - 26175.025974025975, - 28367.420779220778, - 23737.16103896104, - 33303.29090909091, - 23809.67012987013, - 28691.774025974028, - 24254.576623376623, - 30115.919480519482, - 23204.11948051948, - 26166.254545454547, - 27538.477922077924, - 28790.574025974027, - 22860.955844155844, - 29819.66233766234, - 23198.324675324675, - 29892.85974025974, - 22949.012987012986, - 29703.96883116883, - 23350.137662337664, - 30891.890909090907, - 23084.137662337664, - 29286.787012987013, - 23759.758441558442, - 27391.36103896104, - 22920.82857142857, - 25301.03116883117, - 24210.374025974026, - 28794.12207792208, - 24334.722077922077, - 22773.54805194805, - 25450.493506493505, - 23253.516883116885, - 30384.1974025974, - 22950.36103896104, - 28981.35844155844, - 23185.366233766235, - 27603.63116883117, - 25142.33246753247, - 29326.592207792208, - 25092.148051948054, - 24487.38961038961, - 24457.932467532468, - 25230.67792207792, - 23749.87792207792, - 24271.22077922078, - 23328.374025974026, - 24511.215584415586, - 23572.366233766235, - 33586.197402597405, - 28489.8987012987, - 22766.909090909092, - 28562.083116883117, - 24944.412987012987, - 25750.948051948053, - 23532.464935064934, - 26402.36103896104, - 22983.893506493507, - 29303.953246753248, - 24354.436363636363, - 24601.041558441557, - 24043.16103896104, - 24238.075324675323 + 6008.644364384972, + 1676.1780751415338, + 1689.8319608852291, + 1968.3208955223881, + 1818.2856407617087, + 2073.7339166237775, + 1688.2977354606278, + 1682.1206896551723, + 1930.5514668039116, + 1610.3401955738548, + 1568.196603190942, + 1547.7413793103449, + 1522.4776119402984, + 1790.4691199176532, + 1518.8723623262995, + 1533.6001029336078, + 1580.929747812661, + 1573.7804940813176, + 1559.7897581060215, + 2668.225424601132, + 1694.3013381369017, + 1561.6042202779208, + 2124.813432835821, + 1625.4449305198148, + 1545.1937725167268, + 2511.770972722594, + 1687.9925373134329, + 1568.803396809058, + 1688.7786927431807, + 2047.6248069994854, + 1566.2104992279978, + 2145.609109624292, + 1620.1914565105508, + 1561.5483787956769, + 1562.685537828101, + 2153.280236747298, + 1599.8535769428718, + 2082.7485846628924, + 1566.6507977354606, + 1567.629696345857, + 1557.3903757076685, + 2159.9526505404015, + 1563.688368502316, + 2241.1188883170357, + 1661.2969634585693, + 1584.55815748842, + 1582.225681935152, + 2366.734945959856, + 1600.4158517756048, + 1579.349974266598, + 2331.220277920741, + 1643.7472979927948, + 1543.2362326299537, + 2226.1248069994854, + 1599.5741121976325, + 2502.9480185280495, + 1827.9004117344314, + 1677.5437467833247, + 1697.425630468348, + 1973.024446731858, + 1570.2241379310344, + 2235.8862583633554, + 1722.0728255275346, + 1560.6037056098817, + 1921.2503860010293, + 1588.9374678332476, + 1546.292331446217, + 2516.7689140504376, + 1694.2969634585693, + 1560.347143592383, + 2184.097272259393, + 1577.5815748841997, + 1564.5540401441071, + 2492.0131240349974, + 1623.4096757591353, + 1581.4693772516728, + 2250.9917653113744, + 1620.7200205867216, + 1573.597014925373, + 2442.835306227483, + 1673.3983530622747, + 1566.9853319608853, + 2172.2321152856407, + 1573.6513124034998, + 2528.1950591868244, + 1691.8224395265054, + 1553.8098301595471, + 2184.022645393721, + 1615.1340710241893, + 1555.6502830674215, + 2039.3368502316007, + 1569.3530622748328, + 1559.573854863613, + 1573.5542974781265, + 2158.275604734946, + 1553.5386001029335, + 1581.6667524446732, + 2348.2527020072052, + 1589.544776119403, + 2104.351260936696 ] }, "allocationCount": { - "minimum": 699.0051948051948, - "maximum": 699.0077922077922, - "median": 699.0051948051948, - "coefficientOfVariation": 2.0352550875866546E-6, + "minimum": 50.000514668039116, + "maximum": 50.000514668039116, + "median": 50.000514668039116, + "coefficientOfVariation": 0.0, "runs": [ - 699.0051948051948, - 699.0077922077922, - 699.0051948051948, - 699.0077922077922, - 699.0051948051948 + 50.000514668039116, + 50.000514668039116, + 50.000514668039116, + 50.000514668039116, + 50.000514668039116 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 385, + "repeatIterations": 3886, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject_2026-04-20-13-15-03.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject_2026-04-23-12-59-59.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFirstInject-methodTracing-2026-04-20-13-15-03.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledSingletonInject-methodTracing-2026-04-23-12-59-59.trace" } ] }, { - "name": "koinFirstInject", + "name": "koinFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 7482313435, + "totalRunTimeNs": 6247338383, "metrics": { "timeNs": { - "minimum": 99722.62761506277, - "maximum": 199963.81171548116, - "median": 116998.90585774058, - "coefficientOfVariation": 0.10813297526018474, + "minimum": 66393.47359454856, + "maximum": 114202.42419080068, + "median": 78707.14395229983, + "coefficientOfVariation": 0.06847530871352164, "runs": [ - 199963.81171548116, - 163520.5732217573, - 135049.05439330544, - 131194.60669456067, - 128679.62761506277, - 137339.41422594144, - 121962.17154811716, - 138327.94142259413, - 112269.64435146443, - 128303.66945606694, - 121365.50209205021, - 118991.58577405858, - 121608.0460251046, - 127927.21757322176, - 123587.2510460251, - 128272.51046025104, - 126649.6820083682, - 118242.42259414226, - 117224.78242677824, - 111995.94979079498, - 130470.48535564853, - 121535.69874476988, - 122964.820083682, - 133514.85774058578, - 111668.87447698745, - 116773.02928870294, - 123816.19665271966, - 119706.08786610879, - 118829.28870292887, - 114288.0460251046, - 124670.0209205021, - 127295.7949790795, - 133287.79079497908, - 114472.38493723849, - 107645.10878661087, - 115492.53138075313, - 120510.1589958159, - 107197.12552301255, - 119701.20920502092, - 108866.23012552301, - 113295.81171548118, - 112078.99581589959, - 106456.16317991632, - 111492.10460251046, - 116425.44351464436, - 107227.63179916318, - 108305.3640167364, - 108551.87866108786, - 119272.58995815899, - 102664.10460251046, - 105157.1129707113, - 111334.95815899581, - 109909.35983263598, - 107576.04184100419, - 108964.88284518829, - 110799.15481171547, - 129949.91213389121, - 119552.62761506277, - 106963.91631799164, - 112608.33054393306, - 123792.96234309624, - 114677.0, - 115707.59832635983, - 112396.49372384937, - 111477.95815899581, - 113738.50209205021, - 126438.94142259414, - 116151.03347280335, - 120303.34309623431, - 121348.34309623431, - 122451.59832635983, - 125274.41422594142, - 114483.99581589959, - 120571.1589958159, - 124743.74476987448, - 112500.25523012552, - 112681.1338912134, - 122893.7740585774, - 123327.8870292887, - 112625.52301255231, - 126525.2510460251, - 124626.27615062761, - 99722.62761506277, - 119101.27615062761, - 107937.62761506277, - 115513.40167364017, - 102280.28451882846, - 117273.1589958159, - 124704.1129707113, - 103356.04184100419, - 104907.58577405858, - 122755.67364016737, - 105378.55648535564, - 113582.63179916318, - 102720.30125523012, - 108874.02510460251, - 103894.21338912135, - 114467.12133891214, - 101652.92887029289, - 117851.67782426778 + 114202.42419080068, + 85005.94378194209, + 80311.52470187393, + 77145.97614991482, + 81144.77001703577, + 75393.15332197615, + 80606.98807495741, + 74037.92163543441, + 75198.21976149915, + 82652.52299829642, + 73946.62010221466, + 84903.19761499148, + 74606.31345826235, + 83886.37478705282, + 81030.84156729131, + 83387.63373083476, + 77857.0408858603, + 82770.62010221466, + 84924.84667802385, + 73038.93526405451, + 83780.25553662692, + 76787.78023850085, + 80280.29131175469, + 85175.23679727428, + 74422.20442930154, + 82626.43781942078, + 78018.43781942078, + 82277.0272572402, + 76723.98466780239, + 82238.69505962521, + 73293.49403747871, + 77794.39863713799, + 83594.72742759796, + 77900.16354344123, + 81729.04258943781, + 80640.34923339012, + 80363.9608177172, + 73600.67120954003, + 76625.58432708688, + 81757.52470187393, + 79310.67120954003, + 78103.61669505962, + 73489.93867120954, + 81652.55877342419, + 77520.13969335605, + 76600.74275979557, + 80826.41226575809, + 76064.55877342419, + 84939.22146507665, + 82729.27257240204, + 81133.58773424191, + 81316.90119250426, + 80997.92333901192, + 82174.0136286201, + 79855.55195911413, + 80586.13628620103, + 80455.9727427598, + 71877.0408858603, + 77627.58943781942, + 80758.18057921635, + 77881.88415672914, + 83684.43100511073, + 74582.35775127768, + 72874.60817717206, + 84866.90800681431, + 75767.40885860307, + 79583.24531516184, + 76869.85519591141, + 75134.42248722317, + 82063.19250425894, + 82176.3202725724, + 81426.92333901192, + 81285.31345826235, + 81394.80408858602, + 72759.44122657581, + 82094.15843270869, + 81502.34241908007, + 81153.28620102214, + 79821.92333901192, + 72772.0408858603, + 75572.1192504259, + 71862.49063032368, + 80913.10051107325, + 74150.60817717206, + 80787.99318568995, + 76290.90289608177, + 76511.21635434413, + 76571.55025553663, + 66643.59795570698, + 77563.08517887564, + 75991.53492333902, + 73509.45826235093, + 76406.6933560477, + 75616.21635434413, + 75754.89778534924, + 77616.23339011925, + 76104.04258943781, + 66393.47359454856, + 77245.1737649063, + 68904.3867120954 ] }, "allocationCount": { - "minimum": 1987.9832635983264, - "maximum": 1988.020920502092, - "median": 1988.0041841004183, - "coefficientOfVariation": 6.88457089628159E-6, + "minimum": 1249.9965928449744, + "maximum": 1250.0051107325382, + "median": 1250.0034071550256, + "coefficientOfVariation": 2.9546095990722395E-6, "runs": [ - 1988.0, - 1988.008368200837, - 1987.9832635983264, - 1988.020920502092, - 1988.0041841004183 + 1250.0034071550256, + 1249.9965928449744, + 1250.0, + 1250.0051107325382, + 1250.0051107325382 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 239, + "repeatIterations": 587, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject_2026-04-20-13-15-10.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject_2026-04-23-13-00-05.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinFirstInject-methodTracing-2026-04-20-13-15-10.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinFactoryInject-methodTracing-2026-04-23-13-00-04.trace" } ] }, { - "name": "stitchRuntimeRepeatedInject", + "name": "stitchRuntimeSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 2853356040, + "totalRunTimeNs": 2310776040, "metrics": { "timeNs": { - "minimum": 4429.311982330204, - "maximum": 7679.3724461623415, - "median": 4725.225151849807, - "coefficientOfVariation": 0.0764950262441627, + "minimum": 4000.1467136150236, + "maximum": 8045.326291079812, + "median": 4236.702073552426, + "coefficientOfVariation": 0.1162330179071372, "runs": [ - 7679.3724461623415, - 4429.311982330204, - 4533.004417448923, - 4547.340971838763, - 4549.886250690226, - 4542.897570403092, - 4676.628934290447, - 4495.228879072336, - 4548.620651573716, - 5783.895913859746, - 4659.890944229707, - 4762.5764770844835, - 4778.78244064053, - 4759.154334621756, - 4803.673660960795, - 4955.739094422971, - 4778.78244064053, - 5341.043622308117, - 4558.355880728879, - 4792.083655438984, - 4679.4906129210385, - 4699.363335173937, - 4691.310601877416, - 4708.508834897846, - 4683.344284925455, - 4839.766703478741, - 5331.308669243512, - 4509.479017117615, - 4647.308669243512, - 4637.357813362783, - 4664.061016013252, - 4647.898122584208, - 4657.848978464936, - 4674.285201546107, - 5167.538100496963, - 4571.239922694644, - 4720.070127001656, - 4668.475427940364, - 4669.770016565433, - 4668.73440088349, - 4670.014356709001, - 4695.610160132524, - 4701.577581446714, - 5541.913859745997, - 4526.979017117615, - 4675.018498067366, - 4714.274986195472, - 4720.4439536167865, - 4688.535339591386, - 4687.845113197129, - 4757.040309221425, - 5158.723357261181, - 4636.236333517394, - 4602.731639977913, - 4667.828547763666, - 4729.603810049696, - 4707.229155162893, - 4655.346769740475, - 4732.364715626725, - 4769.363887355053, - 5343.861954721148, - 4512.51325234677, - 4791.0196024295965, - 4721.04803975704, - 4750.626725565986, - 4752.1800110436225, - 4748.355052457206, - 4743.480121479845, - 4786.950027609056, - 5043.9014356709, - 4590.307564881281, - 4749.620375483159, - 4765.294312534511, - 4756.666482606295, - 4737.872170071783, - 4704.884870237438, - 4766.3870789618995, - 5383.348702374379, - 4678.138873550524, - 4694.546107123137, - 4733.040585311982, - 4754.020706791828, - 4739.597736057427, - 4743.149364991717, - 4729.402263942573, - 4734.5071783545, - 5171.966869133075, - 4570.247929320817, - 4740.028989508559, - 4735.485091109884, - 4759.858917725014, - 4740.460519050249, - 4741.337658752071, - 4752.855604638321, - 4836.934014356709, - 5148.312534511319, - 4588.121755935947, - 4697.9541689674215, - 4738.245996686914, - 4759.8155715074545 + 8045.326291079812, + 4293.247652582159, + 4210.293427230047, + 4300.54303599374, + 4067.472222222222, + 4195.6631455399065, + 5325.2766040688575, + 4628.040297339593, + 4512.564162754304, + 4120.961267605634, + 4156.396713615023, + 4084.568075117371, + 5021.41627543036, + 4546.593896713615, + 4472.992566510172, + 4185.474178403756, + 4257.282472613459, + 4241.816510172144, + 5026.449139280126, + 4309.182707355242, + 4261.419405320814, + 4255.530125195618, + 4254.429968701095, + 4341.276212832551, + 5129.617370892019, + 4427.653755868545, + 4242.041079812207, + 4201.837245696401, + 4201.164710485133, + 4145.7190923317685, + 5449.147496087637, + 4522.528951486698, + 4132.005477308294, + 4116.111502347418, + 4224.129107981221, + 4187.430751173709, + 4214.18544600939, + 4987.121674491393, + 4250.171361502347, + 4183.538732394366, + 4194.603677621283, + 4170.660406885759, + 4151.0782472613455, + 5602.992957746479, + 4141.786384976525, + 4091.5367762128326, + 4113.278951486698, + 4186.106025039124, + 4184.353677621283, + 4950.178403755868, + 4271.811424100157, + 4160.288732394366, + 4242.550078247261, + 4094.5121283255085, + 4159.310641627543, + 5393.946791862285, + 4341.398669796557, + 4164.608372456964, + 4091.3333333333335, + 4096.91627543036, + 4155.561424100157, + 4232.300860719874, + 4829.873630672926, + 4230.87441314554, + 4209.784037558686, + 4273.991784037558, + 4276.41627543036, + 5415.892410015649, + 4332.045383411581, + 4228.327073552426, + 4220.60406885759, + 4251.129107981221, + 4228.938575899843, + 4082.5712050078246, + 4962.2621283255085, + 4230.833333333333, + 4258.424100156494, + 4211.923708920188, + 4143.335289514867, + 4720.163928012519, + 4292.636541471048, + 4228.510563380281, + 4042.122848200313, + 4072.3012519561817, + 4081.2468701095463, + 4123.875195618153, + 4557.800860719874, + 4000.1467136150236, + 4151.160015649452, + 4247.093896713615, + 4244.649061032864, + 4273.951095461659, + 4623.312989045384, + 4205.708920187793, + 4265.0868544600935, + 4239.045383411581, + 4234.358763693271, + 4286.442097026604, + 5359.814945226917, + 4484.749608763694 ] }, "allocationCount": { - "minimum": 50.0005521811154, - "maximum": 50.00082827167311, - "median": 50.0005521811154, - "coefficientOfVariation": 2.469399021674207E-6, + "minimum": 100.00078247261345, + "maximum": 100.00117370892019, + "median": 100.00078247261345, + "coefficientOfVariation": 1.7496468947145642E-6, "runs": [ - 50.0005521811154, - 50.0005521811154, - 50.0005521811154, - 50.0005521811154, - 50.00082827167311 + 100.00078247261345, + 100.00078247261345, + 100.00078247261345, + 100.00078247261345, + 100.00117370892019 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 3622, + "repeatIterations": 2556, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject_2026-04-20-13-15-13.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject_2026-04-23-13-00-07.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeRepeatedInject-methodTracing-2026-04-20-13-15-13.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeSingletonInject-methodTracing-2026-04-23-13-00-07.trace" } ] }, { - "name": "koinRepeatedInject", + "name": "koinSingletonInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 5600570259, + "totalRunTimeNs": 5816806561, "metrics": { "timeNs": { - "minimum": 30570.708229426433, - "maximum": 46743.08146300914, - "median": 35304.360764754776, - "coefficientOfVariation": 0.0644254681967366, + "minimum": 32317.047502047502, + "maximum": 49366.511875511875, + "median": 35772.29197379197, + "coefficientOfVariation": 0.058360736846633204, "runs": [ - 46743.08146300914, - 35428.313383208646, - 37423.36824605154, - 35635.73732335827, - 34768.893599334995, - 39805.21778886118, - 37835.87863674148, - 34878.03990024938, - 36821.40149625935, - 37813.106400665005, - 35501.523690773065, - 37563.51288445553, - 37213.13050706567, - 36504.18204488778, - 38668.21695760598, - 35764.104738154616, - 38757.01413133832, - 36955.74397339983, - 36527.084788029926, - 37498.22443890274, - 37724.74231088944, - 37603.38736492103, - 37732.577722360766, - 36576.22443890274, - 39902.84704904406, - 35485.59185369909, - 37921.47298420615, - 36895.9110556941, - 36541.54613466334, - 39964.28179551122, - 34104.6251039069, - 34717.67664172901, - 37436.09725685786, - 35318.30174563591, - 36118.38403990025, - 33707.5719035744, - 33935.17040731505, - 36277.70906068163, - 34528.99833748961, - 36517.34330839568, - 33035.509559434744, - 35694.400665004156, - 35397.70407315046, - 32038.610141313384, - 35884.89692435578, - 35164.561928512056, - 34842.71072319202, - 36726.1961762261, - 33611.58686616791, - 35324.44970906068, - 36117.90856192851, - 33602.49542809642, - 35733.14962593516, - 35866.020781379884, - 34484.14546965918, - 35087.75810473815, - 35086.719035743976, - 37584.46799667498, - 34922.979218620116, - 35678.85868661679, - 37155.33167082294, - 33857.06733167082, - 33656.223607647546, - 33944.911886949296, - 33665.87863674148, - 35392.29260182876, - 35290.41978387365, - 35479.357439734, - 34889.90191188695, - 35730.37905236908, - 33829.31587697423, - 34895.963424771406, - 35875.112219451374, - 33631.806317539485, - 33949.50124688279, - 34252.65004156276, - 33802.42975893599, - 33343.420615128845, - 32949.13715710723, - 35089.18703241895, - 31262.252701579386, - 32292.056525353284, - 31327.886118038237, - 35092.650872817954, - 33119.89110556941, - 33397.40897755611, - 33148.33582709892, - 34721.3566084788, - 33811.60847880299, - 32679.45552784705, - 31417.809642560267, - 34873.10307564422, - 30936.3748960931, - 31690.218620116375, - 35879.13881961762, - 33314.06733167082, - 32598.10556940981, - 34185.8029925187, - 35851.86284289277, - 30570.708229426433 + 49366.511875511875, + 37551.40049140049, + 36816.731367731365, + 36994.480753480755, + 36832.002457002454, + 36868.00409500409, + 39451.482391482394, + 37492.06633906634, + 36799.11466011466, + 36822.74610974611, + 37300.75266175266, + 35064.19737919738, + 38440.14414414414, + 34430.751842751844, + 35738.67895167895, + 39262.30221130221, + 36876.364455364455, + 37829.775593775594, + 35327.600327600325, + 38542.56265356265, + 35693.03685503686, + 36808.75511875512, + 35955.28746928747, + 36624.43652743653, + 36721.56592956593, + 35449.76822276822, + 37143.47829647829, + 37188.395577395575, + 34937.29484029484, + 34563.88206388206, + 36170.2325962326, + 34963.52907452908, + 34439.83783783784, + 38981.19737919738, + 35703.4873054873, + 38553.738738738735, + 34906.838656838656, + 35947.90827190827, + 38297.16052416052, + 35214.945126945124, + 37587.10483210483, + 36700.535626535624, + 36421.00900900901, + 35845.14905814906, + 33205.53480753481, + 32317.047502047502, + 34690.01638001638, + 34887.728091728095, + 34615.666666666664, + 38068.99262899263, + 33341.43734643735, + 36377.11547911548, + 35079.597051597055, + 37998.82309582309, + 37907.452907452905, + 34415.18263718264, + 35557.00573300573, + 34555.095004095005, + 36162.511875511875, + 35553.29484029484, + 34549.50696150696, + 34986.77723177723, + 35805.904995904995, + 35678.9180999181, + 36227.47747747748, + 34836.96723996724, + 32506.91072891073, + 34194.77641277641, + 34610.76085176085, + 34171.358722358724, + 34444.52907452908, + 36006.00573300573, + 37231.64946764947, + 33956.37100737101, + 36017.73628173628, + 37476.83701883702, + 34614.98443898444, + 38502.209664209666, + 36825.77477477478, + 33019.85176085176, + 36090.209664209666, + 36251.27927927928, + 33029.1941031941, + 32743.610155610157, + 35424.51597051597, + 37725.56592956593, + 35539.261261261265, + 34826.21785421785, + 34923.773955773955, + 35001.535626535624, + 33997.61998361998, + 35017.31859131859, + 35818.83046683047, + 34553.38902538903, + 36480.85585585586, + 33201.99426699427, + 33047.109746109745, + 35111.80262080262, + 36631.816543816545, + 32845.68714168714 ] }, "allocationCount": { - "minimum": 600.0008312551953, - "maximum": 600.0033250207814, - "median": 600.0016625103907, - "coefficientOfVariation": 1.579622657280212E-6, + "minimum": 599.996723996724, + "maximum": 600.004095004095, + "median": 600.001638001638, + "coefficientOfVariation": 4.883573346772785E-6, "runs": [ - 600.0016625103907, - 600.0033250207814, - 600.0008312551953, - 600.002493765586, - 600.0016625103907 + 600.001638001638, + 600.004095004095, + 599.996723996724, + 600.001638001638, + 599.998361998362 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 1203, + "repeatIterations": 1221, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject_2026-04-20-13-15-19.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject_2026-04-23-13-00-13.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_koinRepeatedInject-methodTracing-2026-04-20-13-15-19.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_koinSingletonInject-methodTracing-2026-04-23-13-00-13.trace" } ] }, { - "name": "stitchPrecompiledRepeatedInject", + "name": "stitchPrecompiledFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1097570937, + "totalRunTimeNs": 2757832030, "metrics": { "timeNs": { - "minimum": 156.6165314885496, - "maximum": 1133.3902671755725, - "median": 162.89712547709922, - "coefficientOfVariation": 0.5561812123350425, + "minimum": 571.878142892706, + "maximum": 1667.6071695294995, + "median": 703.3813169031616, + "coefficientOfVariation": 0.2671295540267385, "runs": [ - 1133.3902671755725, - 333.4414360687023, - 291.04914122137404, - 291.74499045801525, - 256.2731393129771, - 234.08301526717557, - 203.5747853053435, - 201.00906488549617, - 177.24725667938932, - 175.14134064885496, - 182.0991173664122, - 158.80331583969465, - 168.14026717557252, - 175.54520515267177, - 174.48294370229007, - 176.87452290076337, - 174.29651717557252, - 174.29651717557252, - 175.21600667938932, - 174.6010257633588, - 174.38979007633588, - 177.76300095419847, - 157.74713740458014, - 156.6165314885496, - 157.4116173664122, - 156.69728053435114, - 156.67867366412213, - 159.0144322519084, - 158.6542223282443, - 159.55486641221373, - 160.10782442748092, - 160.29413167938932, - 160.56750954198472, - 163.2697996183206, - 159.54878339694656, - 159.40577290076337, - 160.02087309160305, - 159.4927242366412, - 159.5051288167939, - 162.46851145038167, - 159.39957061068702, - 159.35615458015266, - 159.84064885496184, - 159.5363788167939, - 159.27528625954199, - 161.85961354961833, - 159.3188215648855, - 161.36891698473283, - 160.94644561068702, - 161.33170324427482, - 161.2632395038168, - 162.90338740458014, - 162.25107347328245, - 162.63621183206106, - 161.1700858778626, - 161.31917938931298, - 164.19549141221373, - 161.2383110687023, - 161.17628816793894, - 161.65469942748092, - 163.07729007633588, - 160.12643129770993, - 165.1645992366412, - 162.2572757633588, - 161.37511927480915, - 162.36903625954199, - 164.05248091603053, - 163.38156011450383, - 162.08945610687022, - 162.424856870229, - 163.953125, - 163.13322996183206, - 164.8104723282443, - 165.07764790076337, - 163.03375477099237, - 161.99630248091603, - 163.953125, - 162.89086354961833, - 163.74809160305344, - 161.31297709923663, - 165.66149809160305, - 162.39384541984734, - 164.1208253816794, - 164.41292938931298, - 162.76669847328245, - 163.45622614503816, - 165.39444179389312, - 164.15195610687022, - 163.84756679389312, - 163.3071326335878, - 163.36915553435114, - 164.76693702290078, - 166.3821564885496, - 162.31929866412213, - 164.66125954198472, - 164.6054389312977, - 162.34422709923663, - 168.4570610687023, - 163.75429389312978, - 161.15135973282443 + 1667.6071695294995, + 726.3894697535475, + 705.4472242967389, + 620.4503360716953, + 610.5476723923326, + 699.9060243963156, + 844.5318645755539, + 617.6809808314663, + 632.4757281553398, + 843.7647498132935, + 1169.529001742594, + 637.9639034105054, + 808.8927059995021, + 701.3154095095842, + 606.4906646751307, + 904.6619367687329, + 589.6197411003236, + 1148.0929798356983, + 790.9992531740105, + 591.3495145631068, + 1024.5760517799354, + 791.2854119990043, + 830.2535474234503, + 603.0621110281304, + 588.5280059746079, + 971.4041573313418, + 1210.731142643764, + 645.8150360965894, + 786.4350261389096, + 827.9758526263381, + 583.3325865073438, + 899.4599203385611, + 846.4016679113766, + 593.0314911625592, + 990.219068956933, + 618.9929051530993, + 891.6606920587503, + 620.9759770973363, + 768.0679611650486, + 585.8493900921086, + 1013.4770973363206, + 571.878142892706, + 787.0823998008464, + 574.5220313666915, + 1036.1030619865571, + 664.584142394822, + 887.3381877022654, + 584.234503360717, + 808.6516056758775, + 580.1641772467016, + 1133.1633059497137, + 890.312422205626, + 609.1282051282051, + 1074.8339556883245, + 830.2407269106299, + 581.5454319143639, + 763.655215334827, + 590.6792382374906, + 1000.5843913368185, + 576.3608414239483, + 789.8828727906398, + 578.3161563355739, + 771.9270599950212, + 599.9011700273836, + 581.898929549415, + 1137.3725416977845, + 625.314787154593, + 587.911999004232, + 1108.3832462036346, + 585.0136918098083, + 1065.7262882748319, + 587.9108787652477, + 930.4010455563854, + 658.7221807318895, + 659.1974110032362, + 1066.1786158824993, + 877.4970126960418, + 593.7759522031366, + 1037.7048792631317, + 809.5815285038586, + 638.348145382126, + 795.874782175753, + 590.0341050535226, + 930.280931043067, + 573.7679860592482, + 920.1979088872292, + 603.5850136918098, + 646.3257406024396, + 688.3737864077669, + 576.4490913617127, + 1209.0789146128952, + 595.367064973861, + 602.2102315160568, + 987.473861090366, + 592.0532735872541, + 931.852501867065, + 580.1584515807817, + 586.705501618123, + 971.7300224047797, + 593.637789395071 ] }, "allocationCount": { - "minimum": 2.3854961832061068E-4, - "maximum": 2.3854961832061068E-4, - "median": 2.3854961832061068E-4, - "coefficientOfVariation": 1.270359273732003E-16, + "minimum": 50.00024894199652, + "maximum": 50.00024894199652, + "median": 50.00024894199652, + "coefficientOfVariation": 0.0, "runs": [ - 2.3854961832061068E-4, - 2.3854961832061068E-4, - 2.3854961832061068E-4, - 2.3854961832061068E-4, - 2.3854961832061068E-4 + 50.00024894199652, + 50.00024894199652, + 50.00024894199652, + 50.00024894199652, + 50.00024894199652 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 8384, + "repeatIterations": 8034, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject_2026-04-20-13-15-20.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject_2026-04-23-13-00-16.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledRepeatedInject-methodTracing-2026-04-20-13-15-20.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchPrecompiledFactoryInject-methodTracing-2026-04-23-13-00-16.trace" } ] }, { - "name": "daggerRepeatedInject", + "name": "stitchRuntimeFactoryInject", "params": {}, "className": "com.harrytmthy.stitch.benchmark.StitchVsDaggerVsKoinBenchmark", - "totalRunTimeNs": 1125770364, + "totalRunTimeNs": 1867006249, "metrics": { "timeNs": { - "minimum": 84.02853050701805, - "maximum": 570.6907476367803, - "median": 84.12701231738757, - "coefficientOfVariation": 0.5805104547352408, + "minimum": 7644.489032258064, + "maximum": 34684.005161290326, + "median": 9004.805161290322, + "coefficientOfVariation": 0.31255243964902657, "runs": [ - 570.6907476367803, - 256.48696648524776, - 244.4500143225437, - 216.73291320538527, - 120.79272414780866, - 106.65814952735606, - 106.17181323403037, - 103.07155542824405, - 84.11211687195646, - 85.28771125751933, - 84.05545688914351, - 84.1777714122028, - 84.63723861357776, - 84.10615869378401, - 84.05843597822974, - 85.54139215124606, - 84.08524778000573, - 84.5179031796047, - 84.11509596104268, - 84.10020051561158, - 85.19822400458321, - 84.12701231738757, - 84.08828415926669, - 84.5417931824692, - 84.0822686909195, - 84.7686049842452, - 85.17439129189344, - 84.12105413921512, - 84.43735319392724, - 84.13898596390719, - 84.06731595531366, - 86.43357204239473, - 84.05843597822974, - 84.37771412202807, - 84.5030077341736, - 84.11509596104268, - 85.08788312804354, - 84.09722142652535, - 84.02853050701805, - 84.36871956459467, - 84.07928960183328, - 84.09424233743913, - 85.4250358063592, - 84.08822686909195, - 85.88152391864796, - 84.0912632483529, - 84.0763678029218, - 85.24004583213978, - 84.07035233457462, - 84.12105413921512, - 84.66410770552851, - 84.11211687195646, - 84.07631051274707, - 87.02738470352334, - 84.05242050988255, - 84.65814952735606, - 84.04651962188484, - 84.1031796046978, - 85.23998854196505, - 84.11509596104268, - 84.07333142366085, - 84.44932684044686, - 84.0822686909195, - 85.20721856201662, - 84.058378688055, - 84.08828415926669, - 84.39856774563162, - 84.09722142652535, - 84.04646233171012, - 85.11767401890576, - 84.06135777714123, - 84.09716413635061, - 85.06995130335147, - 84.12701231738757, - 85.38917215697508, - 84.13594958464623, - 84.06439415640217, - 84.65522772844457, - 84.0673732454884, - 84.15686049842452, - 85.67568032082498, - 84.09120595817818, - 84.3955886565454, - 84.0912632483529, - 84.06439415640217, - 85.23105127470639, - 84.07928960183328, - 84.11515325121742, - 84.35084503007734, - 84.1031796046978, - 84.07035233457462, - 85.22807218562016, - 84.07035233457462, - 84.4194786594099, - 84.05545688914351, - 84.12403322830134, - 85.61300486966485, - 84.2761959323976, - 84.0673732454884, - 84.36276138642224 + 34684.005161290326, + 11706.181935483872, + 9935.887741935483, + 9156.181935483872, + 9018.145806451614, + 9182.863225806452, + 12961.089032258065, + 10294.354838709678, + 8921.774193548386, + 9181.854193548386, + 9036.894193548387, + 12866.734193548387, + 9262.70193548387, + 9280.779354838709, + 9081.047741935485, + 9127.285161290323, + 9164.314838709677, + 13224.529032258064, + 9482.593548387096, + 9009.407741935484, + 8979.838709677419, + 9169.95870967742, + 9072.98322580645, + 12499.46193548387, + 9096.438709677419, + 8986.35741935484, + 9099.193548387097, + 9033.332903225806, + 9284.87870967742, + 14018.883870967742, + 9733.131612903226, + 8901.411612903226, + 9172.446451612903, + 9125.134193548387, + 12245.025806451613, + 9221.84129032258, + 9048.789677419354, + 9069.892903225806, + 9065.456774193548, + 9167.943225806452, + 14756.652903225806, + 9427.083870967743, + 8978.36129032258, + 9233.938064516129, + 9008.19870967742, + 8922.58064516129, + 11816.061935483871, + 9001.411612903226, + 8785.012903225806, + 8700.067096774193, + 8825.806451612903, + 13636.156129032259, + 10254.704516129032, + 8316.734193548387, + 8360.349677419355, + 8512.50064516129, + 8295.90064516129, + 8273.454193548387, + 11531.518709677419, + 8409.543225806452, + 8296.034838709678, + 8225.605161290323, + 10630.578064516129, + 8102.216774193548, + 8346.101935483872, + 8253.36, + 8064.784516129032, + 8142.809032258065, + 8369.691612903225, + 8385.349677419355, + 10117.406451612904, + 8042.338064516129, + 7894.153548387097, + 8039.5161290322585, + 8161.761290322581, + 10509.677419354839, + 8180.107096774193, + 7906.181935483871, + 7972.781935483871, + 8058.265806451613, + 8184.274838709677, + 7914.785806451613, + 10943.481290322581, + 8043.9509677419355, + 8077.283870967742, + 8108.332903225806, + 7922.580645161291, + 10780.712258064515, + 7978.024516129032, + 7710.8206451612905, + 7757.325161290322, + 7672.176774193548, + 7915.793548387097, + 7644.489032258064, + 7739.18064516129, + 10612.09677419355, + 7869.354838709677, + 7686.424516129032, + 7906.854193548387, + 7829.301935483871 ] }, "allocationCount": { - "minimum": 1.1458034947006589E-4, - "maximum": 1.1458034947006589E-4, - "median": 1.1458034947006589E-4, + "minimum": 213.0025806451613, + "maximum": 213.0025806451613, + "median": 213.0025806451613, "coefficientOfVariation": 0.0, "runs": [ - 1.1458034947006589E-4, - 1.1458034947006589E-4, - 1.1458034947006589E-4, - 1.1458034947006589E-4, - 1.1458034947006589E-4 + 213.0025806451613, + 213.0025806451613, + 213.0025806451613, + 213.0025806451613, + 213.0025806451613 ] } }, "sampledMetrics": {}, "warmupIterations": 20, - "repeatIterations": 17455, + "repeatIterations": 775, "thermalThrottleSleepSeconds": 0, "profilerOutputs": [ { "type": "PerfettoTrace", "label": "Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject_2026-04-20-13-15-21.perfetto-trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject_2026-04-23-13-00-18.perfetto-trace" }, { "type": "MethodTrace", "label": "Method Trace", - "filename": "StitchVsDaggerVsKoinBenchmark_daggerRepeatedInject-methodTracing-2026-04-20-13-15-21.trace" + "filename": "StitchVsDaggerVsKoinBenchmark_stitchRuntimeFactoryInject-methodTracing-2026-04-23-13-00-18.trace" } ] } diff --git a/docs/benchmarks/injection-performance/injection-performance-all-fixtures.json b/docs/benchmarks/injection-performance/injection-performance-all-fixtures.json new file mode 100644 index 0000000..dd41388 --- /dev/null +++ b/docs/benchmarks/injection-performance/injection-performance-all-fixtures.json @@ -0,0 +1,193 @@ +{ + "benchmark_comparison": { + "title": "Stitch vs Dagger vs Koin - Injection Performance", + "unit": "nanoseconds", + "note": "Compilation mode: speed-profile. Dagger values are reference baseline.", + "benchmarks": [ + { + "name": "Factory Inject - 10 Fixtures", + "dagger": { + "min": 124.82, + "median": 212.87, + "max": 351.89 + }, + "stitchPrecompiled": { + "min": 152.39, + "median": 205.44, + "max": 286.29 + }, + "stitchRuntime": { + "min": 1252.44, + "median": 1328.05, + "max": 5823.83 + }, + "koin": { + "min": 12979.91, + "median": 14885.81, + "max": 21332.99 + } + }, + { + "name": "Singleton Inject - 10 Fixtures", + "dagger": { + "min": 308.1, + "median": 429.67, + "max": 969.61 + }, + "stitchPrecompiled": { + "min": 351.26, + "median": 363.41, + "max": 700.07 + }, + "stitchRuntime": { + "min": 655.65, + "median": 736.82, + "max": 1612.38 + }, + "koin": { + "min": 6368.37, + "median": 6934.35, + "max": 10768.13 + } + }, + { + "name": "Factory Inject - 25 Fixtures", + "dagger": { + "min": 307.77, + "median": 364.26, + "max": 893.71 + }, + "stitchPrecompiled": { + "min": 312.48, + "median": 399.93, + "max": 680.88 + }, + "stitchRuntime": { + "min": 3435.8, + "median": 3853.4, + "max": 16376.49 + }, + "koin": { + "min": 34139.08, + "median": 37597.67, + "max": 54751.6 + } + }, + { + "name": "Singleton Inject - 25 Fixtures", + "dagger": { + "min": 804.65, + "median": 898.73, + "max": 2670.6 + }, + "stitchPrecompiled": { + "min": 763.69, + "median": 814.54, + "max": 2251.3 + }, + "stitchRuntime": { + "min": 1738.26, + "median": 1945.52, + "max": 3271.24 + }, + "koin": { + "min": 15881.64, + "median": 17511.96, + "max": 27121.66 + } + }, + { + "name": "Factory Inject - 50 Fixtures", + "dagger": { + "min": 538.95, + "median": 696.04, + "max": 1877.45 + }, + "stitchPrecompiled": { + "min": 571.88, + "median": 703.38, + "max": 1667.61 + }, + "stitchRuntime": { + "min": 7644.49, + "median": 9004.81, + "max": 34684.01 + }, + "koin": { + "min": 66393.47, + "median": 78707.14, + "max": 114202.42 + } + }, + { + "name": "Singleton Inject - 50 Fixtures", + "dagger": { + "min": 1581.95, + "median": 1806.24, + "max": 6645.27 + }, + "stitchPrecompiled": { + "min": 1518.87, + "median": 1634.6, + "max": 6008.64 + }, + "stitchRuntime": { + "min": 4000.15, + "median": 4236.7, + "max": 8045.33 + }, + "koin": { + "min": 32317.05, + "median": 35772.29, + "max": 49366.51 + } + }, + { + "name": "Factory Inject - 100 Fixtures", + "dagger": { + "min": 1149.04, + "median": 1312.69, + "max": 8140.53 + }, + "stitchPrecompiled": { + "min": 1092.85, + "median": 1219.85, + "max": 4722.2 + }, + "stitchRuntime": { + "min": 16223.26, + "median": 18723.38, + "max": 58074.42 + }, + "koin": { + "min": 135187.87, + "median": 158207.7, + "max": 219904.51 + } + }, + { + "name": "Singleton Inject - 100 Fixtures", + "dagger": { + "min": 3484.39, + "median": 4384.39, + "max": 19619.78 + }, + "stitchPrecompiled": { + "min": 3388.82, + "median": 3640.85, + "max": 19153.0 + }, + "stitchRuntime": { + "min": 8935.85, + "median": 9846.31, + "max": 17397.34 + }, + "koin": { + "min": 65152.35, + "median": 73161.62, + "max": 104134.28 + } + } + ] + } +} \ No newline at end of file diff --git a/docs/charts/apk-size-impact-chart.png b/docs/charts/apk-size-impact-chart.png new file mode 100644 index 0000000..6480d6f Binary files /dev/null and b/docs/charts/apk-size-impact-chart.png differ diff --git a/docs/charts/build-time-impact-chart.png b/docs/charts/build-time-impact-chart.png new file mode 100644 index 0000000..57bb5f8 Binary files /dev/null and b/docs/charts/build-time-impact-chart.png differ diff --git a/docs/charts/injection-performance-chart.png b/docs/charts/injection-performance-chart.png new file mode 100644 index 0000000..72b3280 Binary files /dev/null and b/docs/charts/injection-performance-chart.png differ