2 ms·
I had this awakening of raw primal power, like: I can take this ancient thing, in this obscure long forgotten paper, and use to cast new power and speed. 100%.
by microtonal 3y ago
I had this awakening of raw primal power, like: I can take this ancient thing, in this obscure long forgotten paper, and use to cast new power and speed.
100%. I worked for a company a long time ago who were in one application matching tokens against word lists with a certain edit distance was a bottleneck. I replaced it by a solution that uses dictionary automata (directed acyclic finite state automata) for sets of words and Levenshtein automata as matching automata and some code to compute the intersection languages on-the-fly, and it was (IIRC) orders of magnitudes faster. Most of this was based on papers that were pretty obscure in the NLP field, even back then (the knowledge about finite state automata seems to be lost among many recent graduates, since the focus on machine learning became so much stronger).
During my MA internship, I also made a deterministic part-of-speech tagger based on an idea of Roche and Schabes [1] to convert a transformation-based tagger (Brill-style) into a deterministic finite state transducer. The company that I interned with was worried that an HMM tagger would be too slow. The deterministic tagger was very fast, but I convinced them that HMM taggers can be fast as well (and more accurate), so the internship resulted in two taggers.
[1] https://aclanthology.org/J95-2004.pdf https://aclanthology.org/J95-2004.pdf
- jvanderbot 3y agoI had a similar experience with even simpler tools: Classic memoization, caching, and some basic process + instruction parallelism produced a stack that did the job in seconds compared to 10+ minutes. It's amazing how much "production" code can be optimized if you take time to find hot loops. I really wish it was some black magic only I could do (would help with salary negotiations), but it's mundane diligence and saying "no" to anything else for a month-two.