Does this lose the benefit of QR decomposition?

Thank you. After overcoming the fact that my code became so optimized it wouldn’t run at all, I got it to work. The difference was very large, ~8x faster based on the means, considering that is only one part of the calculations. Memory use shows similar improvements.

Before

   julia> @benchmark RBSilly.fit(yx, 2)
    BenchmarkTools.Trial:
      memory estimate:  3.17 MiB
      allocs estimate:  602
      --------------
      minimum time:     71.913 μs (0.00% GC)
      median time:      168.027 μs (0.00% GC)
      mean time:        241.267 μs (41.50% GC)
      maximum time:     2.101 ms (89.42% GC)
      --------------
      samples:          10000
      evals/sample:     1

After

    julia> @benchmark RBSilly.fit(yx, 2)
    BenchmarkTools.Trial:
      memory estimate:  59.86 KiB
      allocs estimate:  190
      --------------
      minimum time:     23.335 μs (0.00% GC)
      median time:      24.966 μs (0.00% GC)
      mean time:        29.430 μs (11.89% GC)
      maximum time:     3.025 ms (94.90% GC)
      --------------
      samples:          10000
      evals/sample:     1
4 Likes