Skip to content

The compilation time is slow #1710

@certik

Description

@certik

I used nlohmann::json in 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 to rapidjson, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: enhancement/improvementstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions