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

Avoid using a Dict for index retrieval with multiagent macro #1066

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

Tortar
Copy link
Member

@Tortar Tortar commented Aug 11, 2024

This shaves away another bit (5%) of overhead of the event queue implementation: now the implementation is almost free in terms of overhead, only the queue insertion and removal take some time (1/3 of total) in RPS, which is probably unavoidable

Copy link
Member

@Datseris Datseris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's DynamicSumTypes.variant_idx?

src/core/model_event_queue.jl Outdated Show resolved Hide resolved
@Tortar
Copy link
Member Author

Tortar commented Aug 12, 2024

it is a (unexported) function from DynamicSumTypes which retrieves the index of the type inside the tuple containing all variants

@Tortar
Copy link
Member Author

Tortar commented Aug 12, 2024

Maybe I will export it in the future, it is anyway stable

@Datseris Datseris merged commit 5d92e5c into main Aug 12, 2024
6 checks passed
@Datseris Datseris deleted the Tortar-patch-2 branch August 12, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants