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

HighwaySegment size & alignment #249

Open
yakra opened this issue May 2, 2023 · 1 comment
Open

HighwaySegment size & alignment #249

yakra opened this issue May 2, 2023 · 1 comment

Comments

@yakra
Copy link
Owner

yakra commented May 2, 2023

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

@yakra yakra changed the title HighwaySegment alignment HighwaySegment size & alignment May 11, 2023
@yakra
Copy link
Owner Author

yakra commented May 11, 2023

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.

@yakra yakra mentioned this issue Jul 12, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant