Open
      
        Bug 1976889
      
      
        Opened 3 months ago
          Updated 3 months ago
      
        
    
  
28% more time spent in JS parsing on when running m=app Google Slides js
Categories
(Core :: JavaScript Engine, defect, P3)
        Core
          
        
        
      
        
    
        JavaScript Engine
          
        
        
      
        
    Tracking
()
        NEW
        
        
    
  
People
(Reporter: jrmuizel, Unassigned)
References
(Blocks 2 open bugs)
Details
One thing stands out is that we seem to have a lot more passes over the AST than Chrome. e.g. js::frontend::NameFunctions and js::frontend::FoldConstants.
Constant folding is unlikely to be helpful on minified code so it's worth questioning whether we should do it all. V8 does some constant folding during parsing which seems like it would be a lot cheaper than doing a whole pass over the AST.
| Comment 1•3 months ago
           | ||
This makes me think of stupid given the scope of this bug, but why don't we generate "structured" bytecode instead of an AST?
The visitor pattern is likely to be simpler and faster as we would have less pointer chasing, with some extra cost of doing memcpy of bytecode chunks.
| Updated•3 months ago
           | 
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•