Skip to content

avoid materialize in ins_kernel! #26

Description

@belledon

ecs = count.(eachcol(partition)) .+ 1

leads to a call to materialize

1518 (17 %) | 1518 (100 %) samples spent calling materialize
    ecs = count.(eachcol(partition)) .+ 1

one option would be to manually allocate ecs. we could instead flip the order in the nested for loop with elements iterated in the outer loop with ecs computed as a scalar.

there also appears to be some confusing syntax on (redundant assignment?)

k_ins[x, ej] = if ej == ei
and

GenRFS/src/tree_walk.jl

Lines 80 to 81 in a57be71

k_ins[x, ej] = (pxej + pcj_inc + pci_dec) -
(pxei + pcj + pci)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

performancepotential ways to improve runtime performance

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions