Skip to content

IntersectionSearchSpace is slow #5949

@not522

Description

@not522

Motivation

The time complexity of IntersectionSearchSpace is O(n_trials) for each trial. We can improve it to the constant time.

We filter trials here, but we can do it in the following for-loop.

trials_of_interest = [trial for trial in trials if trial.state in states_of_interest]

Suggestion

We can move the filtering to the inside of the for-loop. The loop will finish immediately using cached_trial_number.

Additional context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-fixChange that does not change the behavior, such as code refactoring.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions