Skip to content

New complex bridges are very inefficient #321

@araujoms

Description

@araujoms

I've been benchmarking the new complex cone of SCS, and I've noticed that there is a problem with the bridges. For a very large problem the time spent pre-processing went from 15s to 295s. Profiling shows that all of this time is spent in the function set_dot:

function MOI.Utilities.set_dot(
x::AbstractVector{S},
y::AbstractVector{T},
set::ComplexPositiveSemidefiniteConeTriangle,
) where {S,T}
U = MA.promote_operation(MA.add_mul, S, T)
result = zero(U)
d = set.side_dimension
k = 0
for j in 1:d
for i in 1:j-1
k += 1
result = MA.add_mul!!(result, 2, x[k], y[k])
k += 1
result = MA.add_mul!!(result, 2, x[k], y[k])
end
k += 1
result = MA.add_mul!!(result, x[k], y[k])
end
return result
end

Perhaps is it obvious to you what is wrong with it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions