2 ms·
For the spectral-norm one I think it's a failed attempt at parallelism. This code spawns 4000 tasks: parallel: for i in 0..<n: spawn times_i(
by duckerude 5y ago
For the spectral-norm one I think it's a failed attempt at parallelism. This code spawns 4000 tasks:
parallel:
for i in 0..<n:
spawn times_i(v, u, i, n, reverse)
(https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/ebed7a407f4dfcc291fb9efab04ca9c80cc70b93/bench/algorithm/spectral-norm/2.nim https://github.com/hanabi1224/Programming-Language-Benchmark...)
It's almost four times as slow as the otherwise identical single-threaded version.