Skip to content

Commit

Permalink
Improve ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Jul 8, 2024
1 parent e671c9f commit aaf0c55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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!

<sub>*These benchmarks have been run on Julia 1.11*</sub>
Expand Down

0 comments on commit aaf0c55

Please sign in to comment.