Skip to content

Investigate using sorted sets of intervals rather than an interval tree #50

Description

@RyanButler53

To eliminate querying the interval tree many many times while iterating over the lanes, we cache the current end of segment. This is a good speed up since this is only updated once or twice. However it creates a data dependency: The cars at the beginning MUST be processed before the cars at the end of the lane. This does not bode well for any flavor of parallelism. The update/lane change is the most expensive part of the simulation (outside of logging)

Since there are no overlaps in any of the lanes, the real gains of the interval tree aren't that great. I reckon it is possible for the LaneInfo structure to hold sets of pairs, which would be faster than the interval tree to query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvestigationInvestigation ticketquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions