[pseudo] Invert rows/columns of LRTable storage for speedup. NFC
There are more states than symbols. This means first partioning the action list by state leaves us with a smaller range to binary search over. This improves find() a lot and glrParse() by 7%. The tradeoff is storing more smaller ranges increases the size of the offsets array, overall grammar memory is +1% (337->340KB). Before: glrParse 188795975 ns 188778003 ns 77 bytes_per_second=1.98068M/s After: glrParse 175936203 ns 175916873 ns 81 bytes_per_second=2.12548M/s Differential Revision: https://reviews.llvm.org/D127006
Loading
Please sign in to comment