-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
C support for multiport iterator for sparse inputs #95
Conversation
Link to lingua-franca commit
Directly including Edit: Sorry, never mind, I just saw that that causes other problems, which everyone was probably already aware of. |
I moved forward with the "hack" I described above, and everything seems to compile now. I propose to merge this branch without bothering to make the build process work "the right way." These kinds of problems might better be addressed by more comprehensive work on the build system to make it more like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! It looks like if the @sparse
annotation is omitted, the iterator just checks all channels, which is the right thing to do.
Do we have any results on the performance of this change? |
In case anyone is still curious, the Apple Clang bug is explained in this StackOverflow post and will be fixed in (@cmnrd, the decrease in execution time was reported as roughly 15% for the unthreaded runtime.) |
This PR enables more efficient access to input multiports that are sparse, meaning that few of the channels (typically) have inputs present. This is used as in the following example:
In my informal measurement, this yields a 15% improvement in the unthreaded execution of the Big benchmark (with the default setting of 120 Worker reactors).