comparison benchmark/benchmarks.jl @ 1304:37d615522c2f tooling/benchmarks

Add a simple benchmark demonstrating allocations with compositions
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Apr 2023 13:08:05 +0200
parents 58a7aa15ce68
children 6ae9b98b15b9
comparison
equal deleted inserted replaced
1303:2d34290fdc58 1304:37d615522c2f
160 SUITE["boundary_terms"]["application"] = @benchmarkable $u2 .= $H⁻¹*$e₁ₗ'*$H₁ₗ* $d₁ₗ*$v2 160 SUITE["boundary_terms"]["application"] = @benchmarkable $u2 .= $H⁻¹*$e₁ₗ'*$H₁ₗ* $d₁ₗ*$v2
161 # An investigation of these allocations can be found in the branch `allocation_test` 161 # An investigation of these allocations can be found in the branch `allocation_test`
162 162
163 #TODO: Reorg with dimension as first level? To reduce operator creation? 163 #TODO: Reorg with dimension as first level? To reduce operator creation?
164 164
165
166
167 SUITE["lazy_tensors"] = BenchmarkGroup()
168
169 SUITE["lazy_tensors"]["compositions"] = BenchmarkGroup()
170 s = ScalingTensor(1.,(10,))
171 u = rand(10)
172 v = similar(u)
173 s3 = s∘s∘s
174 s4 = s∘s∘s∘s
175 SUITE["lazy_tensors"]["compositions"]["s∘s∘s"] = @benchmarkable $v .= $s3*$u
176 SUITE["lazy_tensors"]["compositions"]["s∘s∘s∘s"] = @benchmarkable $v .= $s4*$u
177
178
165 SUITE 179 SUITE