Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up cluster merge by batch copying arrays #280

Merged

Commits on Jun 16, 2023

  1. Speed up cluster merge by batch copying arrays

    merge_clusters was using zarray_add_all which was copying over elements
    one-by-one doing 2 memcpys and a potential array resize per element.
    Here we replace it by a range copy that does a single resize and memcpy
    for the operation which is a lot faster.
    
    In my testing it reduces the total runtime for an image that's 2000x3000
    by 20%.
    bouk committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    e1b143c View commit details
    Browse the repository at this point in the history