Skip to content

compute_stats.cpp: try/catch -> if/else? #87

Closed

Description

@yakra

Could converting the try/catch blocks if/else in compute_stats.cpp improve speed by avoiding having to construct & throw std::out_of_range objects?

Activity

  1. yakra commented on May 21, 2021

    @yakra
    OwnerAuthor

    It's worked during a couple tests, but just doing a some_map[its_key] += length/whatever_concurrency_count; is probably a bad idea; there shouldn't be any guarantee the mapped value is initialized to zero.

  2. yakra commented on Mar 21, 2022

    @yakra
    OwnerAuthor

    ^ A good idea. There is just such a guarantee. See links @ #216.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions