-
Notifications
You must be signed in to change notification settings - Fork 9
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
template_add/nested/triple are slow to compile #63
Comments
Could you share the updated/modified example, please? PS: There seems some minor delay. We should benchmark and/or debug. |
This one:
|
Most examples compile quickly. The goal is to always compile under 30ms, which most people perceive as "immediate". I noticed the following examples compile slowly:
All other template examples compile under 30ms. We should be running LFortran in Release mode (#80), which might completely fix this. If it does not, then we need to investigate. We also need to test locally how LFortran performs from the command line. |
In release mode, the compilation time seems to be less than 30ms for |
Perfect, so just template_triple needs to be optimized. Not the highest priority right now, but we should investigate what is slowing it down, in case there is something in our design that we need to fix. CC @ansharlubis as well, if you know what could be causing it, let us know. |
A possible reason is that we track requirements and templates with maps inside the compiler instead of defining them in the ASR, I figure this adds some unnecessary memory access during compilation. |
In this example, when you modify the print statement, it takes a noticeable lag after clicking Run to see the results. It's still a fraction of a second, but it's noticeable. While most other examples run immediately. Why would that be? This example is very simple, so I would expect things to run immediately.
The text was updated successfully, but these errors were encountered: