cherry-pick from the gh-pages work SHA-1: c4ea524b22935710d98252a1d9e04ddb82555e56 :: try a faster union() which takes the brunt of the load for large grammars: for jscore this drops 13.2 seconds down to 8.9 seconds total time spent in the generator! (The idea there was that the FIRST/FOLLOW sets are generally quite small; bad cases could run this up to > 128 entries to scan through, but overall the FIRST and FOLLOW sets will be a few tens of entries at best, and thus it was expected that a naive scan would be faster than hash-object creation and O(1) checking that hash... The 'arbitrary' threshold of 52 entries in the array to check against is probably at or near the worst-case FIRST/FOLLOW set site for this grammar as the naive scan consistently outperformed the old smarter hash-object code for smaller thresholds (10, 20, 32, 42!)
cherry-pick from the gh-pages work SHA-1: c4ea524b22935710d98252a1d9e04ddb82555e56 :: try a faster union() which takes the brunt of the load for large grammars: for jscore this drops 13.2 seconds down to 8.9 seconds total time spent in the generator! (The idea there was that the FIRST/FOLLOW sets are generally quite small; bad cases could run this up to > 128 entries to scan through, but overall the FIRST and FOLLOW sets will be a few tens of entries at best, and thus it was expected that a naive scan would be faster than hash-object creation and O(1) checking that hash... The 'arbitrary' threshold of 52 entries in the array to check against is probably at or near the worst-case FIRST/FOLLOW set site for this grammar as the naive scan consistently outperformed the old smarter hash-object code for smaller thresholds (10, 20, 32, 42!)

GerHobbelt/jison,GerHobbelt/jison,GerHobbelt/jison,GerHobbelt/jison