3 ms·
I’m curious whether regular expression matching could be used instead of these tricky plain string structures or string+object structures; storing a trie in a r
by jacobolus 16y ago
I’m curious whether regular expression matching could be used instead of these tricky plain string structures or string+object structures; storing a trie in a regular expression (using grouping and or) should be both small in terms of data over the wire and fast for lookups. The only question is how fast compiling the javascript would be at the start; if that took too long, it could be broken into parts and each part only compiled when needed and then memoized.
John, do you have a link to the corpus you’re using, so that we can use it for tests? Or should people just send in code for you to test?
Edit: nevermind, it's here: https://github.com/jeresig/trie-js/raw/master/dict/string.txt https://github.com/jeresig/trie-js/raw/master/dict/string.tx...