Skip to content

HighwaySegment size & alignment #249

Open

Description

@yakra

The implementation of TMBitset will make sizeof(HighwaySegment) 128 112.
Ergo, it will be a good candidate for alignas(64).

What tasks iterate through these? How do they perform?

TMArray: https://en.cppreference.com/w/c/memory/aligned_alloc or new operator

Activity

  1. changed the title [-]HighwaySegment alignment[/-] [+]HighwaySegment size & alignment[/+] on May 11, 2023
  2. yakra commented on May 11, 2023

    @yakra
    OwnerAuthor

    Could conceivably get as low as 48 B:

    • *waypoint1 and *waypoint2 could be replaced with functions after Waypoint and HighwaySegment objects are stored sequentially in their Route.
    • *route is necessary.
    • double length can be calculated on the fly -- I forget how much time store+retrieve saved in C++
    • *concurrent is necessary.
    • clinched_by is necessary.
    • clin_mtx could go bye-bye.

    Add uint32_t collap_span, travel_span; in order to collapse the HGEdge class into HighwaySegment and we're still at 56 B, < 1 cache line.

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