From aaf0c55cd4341a71f389d399bf45354a1ffb2575 Mon Sep 17 00:00:00 2001 From: Adriano Meligrana <68152031+Tortar@users.noreply.github.com> Date: Mon, 8 Jul 2024 03:17:53 +0200 Subject: [PATCH] Improve ReadMe --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e631e47..688fc6d 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,8 @@ julia> b.y = 3.0 ## Dispatch -For this, you can simply destructure the sum type with -`variant` and then dispatch on it: +For this, you can simply access the variant +inside the sum type and then dispatch on it: ```julia julia> f(x::AT) = f(variant(x)) @@ -215,7 +215,7 @@ BenchmarkTools.Trial: 1115 samples with 1 evaluation. Memory estimate: 8.00 MiB, allocs estimate: 200003. ``` -In this micro-benchmark, using `@sumtype` is more than 2 times faster and 3 times more +In this micro-benchmark, using `@sumtype` is more than 2 times faster and 3 times memory efficient than `Union` types! *These benchmarks have been run on Julia 1.11*