-
Notifications
You must be signed in to change notification settings - Fork 30
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
Using fparser
in FORD
documentation and fortls
language server
#329
Comments
Hi @gnikit, Thanks for your interest in We have been adding We would obviously be pleased if As for performance, one of my colleagues (@sergisiso) has some ideas on how speed things up (beyond better tree pruning by tightening the rule checking and traversing in the best order), but the As for overlap, I can see that fparser could potentially be used in fortls (and FORD) but beyond that they are pretty separate (if that is what you meant). We have a telco planned with @ZedThree to discuss |
Hi @rupertford, Thanks for the insightful feedback, it is much appreciated. I am very happy to see that you are actively developing the project and are thinking about performance improvements. I have some performance timings that I will attach bellow. The
A chat would be great. Please contact me at gnikit@duck.com BenchmarkThis is a fairly simple F90 benchmark over a very large file. certik suggested it to me when we compared Python code to generate benchmark source codedef gen_sub(no: int):
sub = """subroutine g{0}(x)
integer, intent(inout) :: x
integer :: i
x = 0
do i = {0}, {1}
x = x+i
end do
end subroutine
""".format(
no, no + 9
)
return sub
def write_bench3():
with open("bench3.f90", "w") as f:
f.write("program bench3\n")
f.write("implicit none\n")
f.write("integer :: c\n")
f.write("c = 0\n")
for i in range(1, 10001):
f.write(f"call g{i}(c)\n")
f.write("\nprint *, c\n")
f.write("\ncontains\n\n")
for i in range(1, 10001):
f.write(gen_sub(i))
f.write("end program")
if __name__ == "__main__":
write_bench3()
I don't necessarily think this is a 100% fair comparison, but it should give a rough idea about the performance of each parser.
|
Thanks @gnikit. We are impressively slow :-). We have some ideas on how to improve so will work on those. |
(towards #329) add benchmark script
Hi, I am the dev behind the
fortls
Fortran Language Server. There has been a few discussions in the Fortran community [1, 2] about utilising a single Fortran parser to fit our needs and I was wondering whether or notfparser
could be used.My main concerns with fparser are
fortls
's orlfortran
's AST parsersDo you have any plans on extending the supported standard to F2018?
And do you see a potential overlap between
fortls
and/orFORD
andfparser
CC @ZedThree
The text was updated successfully, but these errors were encountered: