Open devoncarew opened 1 year ago
To repro the issue, see the br_table.0.dart
file here: https://github.com/devoncarew/wasmd/tree/main/test/spec/br_table.
Yes, Observatory shows quite interesting picture. There are so far two big performance issues visible:
FlowAnalysisHelper.getLabelTarget
- probably indeed O(n^2)
FlowModel._clone
- at the end there are 24618
in variableInfo
map. It looks that each case
in the switch
adds one new entry to variableInfo
, so it is also O(n^2)
.CC @stereotype441 for FlowModel performance.
I'm working on some generated code and am seeing a potential performance issue in the analyzer with large switch statements. I have a switch statement with 24,615 cases and notice that:
Perhaps there's some non-linear algorithm involving switch statements? The file itself is large - 1,379kb - but I'm working with other files that size or larger and not seeing the same issue.