-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
The compilation time is slow #1710
Copy link
Copy link
Closed
Labels
kind: enhancement/improvementstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Metadata
Metadata
Assignees
Labels
kind: enhancement/improvementstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
I used
nlohmann::jsonin some AST tree to JSON conversion in a compiler, and it was very easy to get started, documentation is good, syntax is simple and it just works. However, I noticed that the compilation time of my code got really slow. So I switched torapidjson, it took me a lot longer to get started, but when all was done, the compilation of one file got from 4.8s to 1.8s, here is the patch that achieves this speed up:https://gitlab.com/lfortran/lfortran/commit/904cb6301e86f95e6ad86d571ea74b23cd2b0e70
and another file from 5.7s to 2.8s:
https://gitlab.com/lfortran/lfortran/commit/bfe179ec2ab72855d273db1258c858857ddb9fa2
I am posting it here as a feedback, if there is anything that you can do to speedup the compilation, that would be very helpful.