HNHacker News
TopNewBestAskShowJobs

micheleriva

91 karma · joined December 20, 2018

submissionscomments
micheleriva··on Lyra: Fast, in-memory, typo-tolerant, full-text search engine in TypeScript
We have a benchmark section in the repo and it's performing pretty well, we'll definitely run it against other engines!
micheleriva··on Lyra: Fast, in-memory, typo-tolerant, full-text search engine in TypeScript
The current release of Lyra is treating the trie structure as a tree (of course), but we're planning to start approaching it as a graph for the exact reason you're mentioning. We don't have performance comparisons yet, but we'll document everything
micheleriva··on Lyra: Fast, in-memory, typo-tolerant, full-text search engine in TypeScript
Yes, Lyra is the name of a constellation, so there's collision even outside the programming world
micheleriva··on Lyra: Fast, in-memory, typo-tolerant, full-text search engine in TypeScript
Lyra author here: we planned support for Node.js, Deno, Bun, and plain V8. We'll be adding runtime-specific APIs via a plugin system later on
micheleriva··on Lyra: Fast, in-memory, typo-tolerant, full-text search engine in TypeScript
Lyra author here: I wouldn't compare it with other JS search engines for a simple reason: we'll be targeting edge execution (Cloudflare workers, lambda@edge, etc.), so the focus is really different
micheleriva··on Lyra: Fast, in-memory, typo-tolerant, full-text search engine in TypeScript
Disclaimer: Lyra author here!

The biggest problem I have with TypeScript is to know WHAT .ts files will be compiled into. I.e., if you're using enums or decorators, there's no plain support for them in JS so you'll end up having some kind of "polyfills", which are not so optimized.

Once you analyze your compiled JS, you can write TS knowing what you're gonna get, which is the trick to make it optimized.

My two cents :)