Skip to content
Snippets Groups Projects
  • Studer Gabriel's avatar
    f04f0859
    make removing atoms fast again · f04f0859
    Studer Gabriel authored
    Removing atoms from huge structures was observed to be super slow.
    Reason was the removal from the spatial organizer which helps to find atoms
    based on spatial proximity. The organizer is organized in buckets which
    occupy a certain volume in space. Removing an element meant to iterate over
    all buckets and all their items until the atom is found. However, we know
    the position of the atom and thus can pinpoint the bucket in which its
    expected to be. The SpatialOrganizer::Remove was therefore overloaded with
    a version that accepts a position as hint in which bucket to look.
    If the atom is there, delete and return. If not, call Remove without position
    hint.
    f04f0859
    History
    make removing atoms fast again
    Studer Gabriel authored
    Removing atoms from huge structures was observed to be super slow.
    Reason was the removal from the spatial organizer which helps to find atoms
    based on spatial proximity. The organizer is organized in buckets which
    occupy a certain volume in space. Removing an element meant to iterate over
    all buckets and all their items until the atom is found. However, we know
    the position of the atom and thus can pinpoint the bucket in which its
    expected to be. The SpatialOrganizer::Remove was therefore overloaded with
    a version that accepts a position as hint in which bucket to look.
    If the atom is there, delete and return. If not, call Remove without position
    hint.