# SuiteSparse.CHOLMOD.lowrankupdate! does not speed up calculations

**URL:** <https://discourse.julialang.org/t/suitesparse-cholmod-lowrankupdate-does-not-speed-up-calculations/63690>\
**Category:** Performance\
**Tags:** linearalgebra, factorization\
**Created:** [June 28, 2021, 11:17am UTC](https://discourse.julialang.org/t/suitesparse-cholmod-lowrankupdate-does-not-speed-up-calculations/63690 "2021-06-28T11:17:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidelkin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sidelkin/32/43911_2.png) [@sidelkin](https://discourse.julialang.org/u/sidelkin)\
**Post date:** [June 28, 2021, 11:17am UTC](https://discourse.julialang.org/t/suitesparse-cholmod-lowrankupdate-does-not-speed-up-calculations/63690/1 "2021-06-28T11:17:48Z")

</div>

Hello. Can someone explain why using SuiteSparse.CHOLMOD.lowrankupdate! does not give acceleration in this example?

```julia
using BenchmarkTools, LinearAlgebra, SparseArrays, Test, SuiteSparse

N = 100; M = 20
b = rand(N)
spA = spdiagm(-1 => ones(N-1), 
              1 => ones(N-1), 
              0 => 5 .* ones(N))
x1 = @btime (
    F = cholesky($spA);
    diags = spdiagm(sqrt.($b));
    for n = 1:$M
        SuiteSparse.CHOLMOD.lowrankupdate!(F, diags)
        x1 .= F \ $b
    end; 
    x1
) setup=(x1 = similar($b))
x2 = @btime (
    A = copy($spA); 
    diagb = spdiagm($b); 
    for n = 1:$M
        A .+= diagb
        x2 .= A \ $b
    end; 
    x2
) setup=(x2 = similar($b))
@test x1 ≈ x2

```

The result is  
2.022 ms (565 allocations: 385.43 KiB)  
639.500 μs (976 allocations: 978.42 KiB)  
Test Passed

My Julia version is  
Julia Version 1.6.1  
Commit 6aaedecc44 (2021-04-23 05:59 UTC)  
Platform Info:  
OS: Windows (x86\_64-w64-mingw32)  
CPU: Intel(R) Core™ i7-4710HQ CPU @ 2.50GHz  
WORD\_SIZE: 64  
LIBM: libopenlibm  
LLVM: libLLVM-11.0.1 (ORCJIT, haswell)  
Environment:  
JULIA\_EDITOR = code  
JULIA\_NUM\_THREADS =
