-
Notifications
You must be signed in to change notification settings - Fork 171
List in C/C++ backend #1095
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
List in C/C++ backend #1095
Conversation
6d010bd
to
3893ed8
Compare
@certik This is ready to review. Feel free to review the diff in total and let me know if any change is to be made. Otherwise I will clean up the git history and merge. |
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.
Thanks for implementing it!
I think this is fine to merge.
As an improvement in subsequent PRs, the C++ version should just use std::vector
for lists, as that is the natural data structure that people would use in C++, pretty much equivalent to our list in ASR.
I think we should expose this with something like |
Yes, making it configurable is even better. |
How do the list benchmarks behave? Are we now getting the same performance in C/C++ as in LLVM, and if not, why not? |
I don’t know how to enable -O3 optimisation for C compiler in integration tests. Please let me know and I will share the benchmark data with you. |
I would execute the benchmarks by hand. Just compile it by hand and enable all optimization options. |
Implementing 2.ii in #1077 (comment).
Closes #1077
Benchmark - #857 (comment) (see
list04
row). Our generated C code (with no optimisation flags enabled for C compiler) is faster than un-optimised (no -O3 flag) executable generatedclang++
.