-
Notifications
You must be signed in to change notification settings - Fork 171
Use optimisation flags for C compiler in lpython decorator #2201
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
Conversation
@@ -687,9 +687,9 @@ def get_rtlib_dir(): | |||
|
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.
I'm not sure if the --fast` option works in the C backend. If it does, then we can use it in line 684?
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.
It doesn't I think.
dbcc4d9
to
689a76d
Compare
|
The decorator should be used from CPython mode, i.e., when the module is | ||
being run using CPython. When possible, it is recommended to use LPython | ||
for the main program, and use the @cpython decorator from the LPython mode | ||
to access CPython features that are not supported by LPython. |
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 documentation should be somewhere.
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.
Awesome, this looks great! I left a comment.
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.
Looks good to me!
I think we should use all the optimisations flags by default in
lpython
decorator and generate as fast code as possible. It produces a significant difference when comparing with other JIT compilers.