Skip to content

Commit 0eac15f

Browse files
author
Milan K
authored
Update README.md
1 parent a69a0d2 commit 0eac15f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@ julia> @btime Float32.($A);
5050
julia> 413.303/300^2*1000
5151
4.592255555555555
5252
```
53-
Conversions from Float8 to Float32 take about 4.5ns (table-driven), conversions in the other direction are about 2x slower (lookup tables could probably improve the performance though).
53+
Conversions from Float8 to Float32 take about 4.5ns, conversions in the other direction are about 2x slower and slightly slower than for `Float16`.
5454
```julia
55-
julia> B = randn(Float32,300,300);
55+
julia> A = Float32.(randn(300,300));
5656

57-
julia> @btime Float8.($B);
58-
922.728 μs (2 allocations: 88.02 KiB)
57+
julia> @btime Float16.($A);
58+
674.123 μs (2 allocations: 175.89 KiB)
59+
60+
julia> @btime Float8.($A);
61+
955.196 μs (2 allocations: 88.02 KiB)
5962
```
6063

0 commit comments

Comments
 (0)