• Kevin Modzelewski's avatar
    Intern most codegen strings · 325dbfeb
    Kevin Modzelewski authored
    Most importantly, intern all the strings we put into the AST* nodes.
    (the AST_Module* owns them)
    
    This should save us some memory, but it also improves performance pretty
    substantially since now we can do string comparisons very cheaply.  Performance
    of the interpreter tier is up by something like 30%, and JIT-compilation times
    are down as well (though not by as much as I was hoping).
    
    The overall effect on perf is more muted since we tier out of the interpreter
    pretty quickly; to see more benefit, we'll have to retune the OSR/reopt thresholds.
    
    For better or worse (mostly better IMO), the interned-ness is encoded in the type
    system, and things will not automatically convert between an InternedString and
    a std::string.  It means that this diff is quite large, but it also makes it a lot
    more clear where we are making our string copies or have other room for optimization.
    325dbfeb
irgen.h 5.51 KB