@@ -19,21 +19,21 @@ for T ∈ [Int64, Float64]
1919 mutables = [rand (T,N), rand (MVector{N,T}), SizedVector {N} (rand (T,N))]
2020 instances = vcat (immutables, mutables)
2121
22- namelengths = [length (string (typeof (v). name . name )) for v ∈ instances]
22+ namelengths = [length (string (nameof ( typeof (v)) )) for v ∈ instances]
2323 maxnamelength = maximum (namelengths)
2424
2525 for v ∈ instances
2626 result = mean (@benchmark plus ($ (copy (v)), $ (copy (v))))
27- padding = maxnamelength - length (string (typeof (v). name . name ))
28- println (typeof (v). name . name , " :" , " " ^ padding, " v3 = v1 + v2 takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
27+ padding = maxnamelength - length (string (nameof ( typeof (v)) ))
28+ println (nameof ( typeof (v)) , " :" , " " ^ padding, " v3 = v1 + v2 takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
2929 end
3030
3131 println ()
3232
3333 for v ∈ mutables
3434 result = mean (@benchmark plus! ($ (copy (v)), $ (copy (v)), $ (copy (v))))
35- padding = maxnamelength - length (string (typeof (v). name . name ))
36- println (typeof (v). name . name , " :" , " " ^ padding, " v3 .= +.(v1, v2) takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
35+ padding = maxnamelength - length (string (nameof ( typeof (v)) ))
36+ println (nameof ( typeof (v)) , " :" , " " ^ padding, " v3 .= +.(v1, v2) takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
3737 end
3838
3939 println ()
@@ -48,21 +48,21 @@ for T ∈ [Int64, Float64]
4848 mutables = [rand (T,N,N), rand (MMatrix{N,N,T}), SizedMatrix {N,N} (rand (T,N,N))]
4949 instances = vcat (immutables, mutables)
5050
51- namelengths = [length (string (typeof (v). name . name )) for v ∈ instances]
51+ namelengths = [length (string (nameof ( typeof (v)) )) for v ∈ instances]
5252 maxnamelength = maximum (namelengths)
5353
5454 for m ∈ instances
5555 result = mean (@benchmark mul ($ (copy (m)), $ (copy (m))))
56- padding = maxnamelength - length (string (typeof (m). name . name ))
57- println (typeof (m). name . name , " :" , " " ^ padding, " m3 = m1 * m2 takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
56+ padding = maxnamelength - length (string (nameof ( typeof (m)) ))
57+ println (nameof ( typeof (m)) , " :" , " " ^ padding, " m3 = m1 * m2 takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
5858 end
5959
6060 println ()
6161
6262 for m ∈ mutables
6363 result = mean (@benchmark mul! ($ (copy (m)), $ (copy (m)), $ (copy (m))))
64- padding = maxnamelength - length (string (typeof (m). name . name ))
65- println (typeof (m). name . name , " :" , " " ^ padding, " A_mul_B!(m3, m1, m2) takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
64+ padding = maxnamelength - length (string (nameof ( typeof (m)) ))
65+ println (nameof ( typeof (m)) , " :" , " " ^ padding, " A_mul_B!(m3, m1, m2) takes " , prettytime (time (result)), " , " , prettymemory (memory (result)), " (GC " , prettytime (gctime (result)) , " )" )
6666 end
6767
6868 println ()
0 commit comments