5 ms·
We recently started using perfect hashing in V8's parser, also with measurable performance improvement (even over what we had previously, a first character jump
by Leszek 8y ago
We recently started using perfect hashing in V8's parser, also with measurable performance improvement (even over what we had previously, a first character jump table followed by linear search). It's always nice to apply that computer science education to a real world problem.
- miclill 8y agoCould you provide a link to the implementation, please?
- Leszek 8y agoJust a wrapper around gperf: https://cs.chromium.org/chromium/src/v8/src/parsing/keywords-gen.h https://cs.chromium.org/chromium/src/v8/src/parsing/keywords... https://cs.chromium.org/chromium/src/v8/tools/gen-keywords-gen-h.p https://cs.chromium.org/chromium/src/v8/tools/gen-keywords-g...