Skip to content
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

Optimizing running time #6

Open
SebastienRietteMTO opened this issue Oct 11, 2023 · 3 comments
Open

Optimizing running time #6

SebastienRietteMTO opened this issue Oct 11, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@SebastienRietteMTO
Copy link
Contributor

Copied from SebastienRietteMTO/PHYEX-fortran-tool#13

Profiling of commit ca993f46 is the following on all PHYEX (sxphynh)

--addIncludes : 0.16s
--applyCPP: 0.26s
--deleteNonColumnCalls : 30.8s
--inlineContainedSubroutines : 99.6s
--changeIfStatementsInIfConstructs : 2.1s
--expandAllArrays : 141.3s
--attachArraySpecToEntity : 0.35s
--removeIJLoops : 82.8
--reDimKlonArrayToScalar : 23.1s
--addStack : 26.4s
Total : 407s

Detailed running time on internal functions are still in SebastienRietteMTO/PHYEX-fortran-tool#13

@SebastienRietteMTO
Copy link
Contributor Author

SebastienRietteMTO commented Oct 12, 2023

A test with --expandAllArrays on turb.F90 shows that one third of the running time for this option is lost in checkInDoWhile because of the getParent usage.
A way to suppress this time is to rewrite the removeArraySyntax to recursively enter the different blocs instead of going directly to the a-stmt nodes. This way, we know which node is the parent and if we are in a if statment or in a do while construct

Edit: done in 5faa98f (execution time for this option divided by 4)

@SebastienRietteMTO
Copy link
Contributor Author

It might be interesting to be able to call fxtran without writing on disk (createExpr, createExprPart, wrapH)

@SebastienRietteMTO
Copy link
Contributor Author

Look for all calls to fortran2xml (as in variables.addVar) to replace them by expressions.createExpr and add a cache around it (as for createExprPart)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant