Skip to content

Commit 92ecca8

Browse files
update readme performance comparison
1 parent f45e05b commit 92ecca8

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Reflex is an [Dependency Injection](https://stackify.com/dependency-injection/)
5151
---
5252

5353
## 👀 Overview
54-
- **Fast:** ~3x faster than VContainer, ~7x faster than Zenject.
55-
- **GC Friendly:** ~2x less allocations than VContainer, ~9x less allocations than Zenject.
54+
- **Fast:** up to 414% faster than VContainer, up to 800% faster than Zenject.
55+
- **GC Friendly:** up to 28% less allocations than VContainer, up to 921% less allocations than Zenject.
5656
- **AOT Support:** Basically there's no runtime Emit, so it works fine on IL2CPP builds. [<sup>[*]</sup>](#-scripting-restrictions)
5757
- **Contract Table:** Allows usages of APIs like `container.All<IDisposable>`
5858
- **Immutable Container**: Performant thread safety free of lock plus predictable behavior.
@@ -531,32 +531,32 @@ Currently, logging verbosity is configured in this file, and default value is se
531531
> Resolving ten thousand times a transient dependency with four levels of chained dependencies. See [NestedBenchmarkReflex.cs](Assets/Reflex.Benchmark/NestedBenchmarkReflex.cs).
532532
533533
### Android + Mono
534-
| | GC | Time | GC Ratio | Time Ratio |
535-
|-----------|---------:|--------:|---------:|-----------:|
536-
| Reflex | 54.7 KB | 500ns | 100% | 100% |
537-
| Zenject | 503.9 KB | 3200ns | 921% | 640% |
538-
| VContainer| 70.3 KB | 1950ns | 128% | 390% |
534+
| | GC | Time | GC Ratio | Time Ratio |
535+
|------------|---------:|---------:|---------:|-----------:|
536+
| Reflex | 54.7 KB | 4.9ms | 100% | 100% |
537+
| Zenject | 503.9 KB | 34.4ms | 921% | 702% |
538+
| VContainer | 70.3 KB | 20.3ms | 128% | 414% |
539539

540540
### Android + IL2CPP
541-
| | GC | Time | GC Ratio | Time Ratio |
542-
|-----------|---------:|-------:|---------:|-----------:|
543-
| Reflex | 140.6 KB | 470ns | 100% | 100% |
544-
| Zenject | 1000 KB | 1950ns | 711% | 414% |
545-
| VContainer| 140.6 KB | 500ns | 100% | 106% |
541+
| | GC | Time | GC Ratio | Time Ratio |
542+
|-----------|----------:|-------:|---------:|-----------:|
543+
| Reflex | 140.6 KB | 4.0ms | 100% | 100% |
544+
| Zenject | 1000 KB | 15.8ms | 711% | 395% |
545+
| VContainer| 140.6 KB | 4.2ms | 100% | 105% |
546546

547547
### Windows + Mono
548-
| | GC | Time | GC Ratio | Time Ratio |
549-
|-----------|---------:|-------:|---------:|-----------:|
550-
| Reflex | 140.6 KB | 70ns | 100% | 100% |
551-
| Zenject | 1000 KB | 540ns | 711% | 771% |
552-
| VContainer| 140.6 KB | 180ns | 100% | 257% |
548+
| | GC | Time | GC Ratio | Time Ratio |
549+
|-----------|-----------:|-------:|---------:|-----------:|
550+
| Reflex | 140.6 KB | 0.7ms | 100% | 100% |
551+
| Zenject | 1000 KB | 5.6ms | 711% | 800% |
552+
| VContainer| 140.6 KB | 1.9ms | 100% | 271% |
553553

554554
### Windows + IL2CPP
555-
| | GC | Time | GC Ratio | Time Ratio |
555+
| | GC | Time | GC Ratio | Time Ratio |
556556
|-----------|---------:|-------:|---------:|-----------:|
557-
| Reflex | 140.6 KB | 140ns | 100% | 100% |
558-
| Zenject | 1000 KB | 600ns | 711% | 428% |
559-
| VContainer| 140.6 KB | 310ns | 100% | 221% |
557+
| Reflex | 140.6 KB | 1.4ms | 100% | 100% |
558+
| Zenject | 1000 KB | 6.2ms | 711% | 442% |
559+
| VContainer| 140.6 KB | 3.0ms | 100% | 214% |
560560

561561
## 🚫 Scripting Restrictions
562562
If you are taking advantage of reflex to inject `IEnumerable<T>` in your constructors **AND** your are building for **IL2CPP**, you will probably get some exceptions like following:

0 commit comments

Comments
 (0)