fuzion icon indicating copy to clipboard operation
fuzion copied to clipboard

DFA slow, likely for effects

Open fridis opened this issue 1 year ago • 1 comments

Running tests/catch_postcondition with the JVM backend takes 24s on my machine, 93% of this time is spent during DFA. pid951376-fuzion-XjavaProf-flamegraph

fridis avatar Jul 15 '24 19:07 fridis

see also: #2360

michaellilltokiwa avatar Jul 16 '24 07:07 michaellilltokiwa

This is not the case anymore:

~/openvscode-server-fuzion/vscode-fuzion/fuzion (main)130$ make no-java && fz -verbose=3  tests/catch_postcondition/catch_postcondition.fz
make: Nothing to be done for 'no-java'.
498 features 387 types and 1 source files included in fum file.
DFA pre iteration #1: --------------------------------------------------calls:0,values:2,envs:0
DFA pre iteration #2: --------------------------------------------------calls:1835,values:2076,envs:0
DFA pre iteration #3: --------------------------------------------------calls:1925,values:2144,envs:0
DFA pre iteration #4: --------------------------------------------------calls:1972,values:2189,envs:0
DFA pre iteration #5: --------------------------------------------------calls:1977,values:2190,envs:0
DFA pre iteration #6: --------------------------------------------------calls:1977,values:2190,envs:0
DFA pre iteration #7: --------------------------------------------------calls:1977,values:2190,envs:0
DFA pre iteration #8: --------------------------------------------------calls:1977,values:2190,envs:0
DFA pre iteration #9: --------------------------------------------------calls:1977,values:2190,envs:0
DFA pre iteration #10: --------------------------------------------------calls:1977,values:2190,envs:0
DFA pre iteration #11: --------------------------------------------------calls:1977,values:2190,envs:0
DFA pre iteration #12: --------------------------------------------------calls:1977,values:2190,envs:0
DFA real iteration #1: --------------------------------------------------calls:0,values:2190,envs:0
DFA real iteration #2: --------------------------------------------------calls:1715,values:4006,envs:0
DFA real iteration #3: --------------------------------------------------calls:1737,values:4010,envs:0
DFA real iteration #4: --------------------------------------------------calls:1742,values:4010,envs:0
DFA real iteration #5: --------------------------------------------------calls:1742,values:4010,envs:0
DFA needed 17 iterations (pre/real) (12/5).
Elapsed time for phases: prep 34ms, fe 339ms, createMIR 58ms, ir 5ms, dfa_pre 1608ms, dfa_real 201ms, opt 2ms, be 411ms

michaellilltokiwa avatar Oct 06 '25 09:10 michaellilltokiwa