Orama alternative

Narsil vs Orama

The benchmark harness measured Narsil and Orama in Node.js for speed, ranking quality, and memory. Every result is here, including Orama's wins.

124×

shorter median than Orama

0.129ms median

When Narsil is embedded in a Node.js process, a keyword search over 50,000 documents takes a median of 0.129 ms.

  • Narsil0.129 ms
  • Orama15.969 ms

A lower time means a faster search. On SciFact, Narsil ranks results at nDCG@10 0.684 and Orama at 0.435.

The harness recorded these figures in run 20261119T135657Z on 19 November 2026, with Narsil built from commit 3ad47df2c9c1.

The harness measured Narsil 0.4.5 against Orama 3.1.18.

The harness tested each engine in a separate Node.js v24.22.3 process on GCP c3-standard-8, us-central1-a, on the processor that the machine reports as Intel(R) Xeon(R) Platinum 8481C CPU @ 2.70GHz. Narsil searched vectors through WebAssembly, the way it does in a browser.

What each engine is for

Orama

Orama is a search engine written in TypeScript that offers full-text, vector, and hybrid search. It works in browsers, on servers, and at the edge, and a plugin system extends it.

Narsil

Narsil also embeds in a JavaScript process, and it offers full-text, vector, hybrid, and geo search on one typed index. When an application outgrows one process, the same engine can serve the index over HTTP.

Keyword search

Each engine indexes the same FiQA documents and answers the same queries at each corpus size.

Keyword search, Keyword search
MeasureCorpusNarsilOrama
Documents inserted a second1,000 documents12,1724,290
10,000 documents13,5844,001
50,000 documents13,0263,720
Median search, ms1,000 documents0.0490.066
10,000 documents0.0551.361
50,000 documents0.12915.969
p95 search, ms1,000 documents0.1120.580
10,000 documents0.12810.160
50,000 documents0.468384.472
Heap and external memory, MB1,000 documents1.111.4
10,000 documents6.687.3
50,000 documents23.1398.2

Filtered search

Each query adds a category filter and a minimum score filter to the search words.

Filtered search, Filtered search
MeasureCorpusNarsilOrama
Median filtered search, ms1,000 documents0.0520.057
10,000 documents0.0750.906
50,000 documents0.1508.024

Vector search

Each engine stores the same SciFact and NFCorpus embeddings and answers the same nearest-neighbour queries.

Vector search, Vector search
MeasureCorpusNarsilOrama
Recall@10 against exact searchSciFact1.0001.000
NFCorpus1.0001.000
Documents inserted a secondSciFact50,499189,085
NFCorpus44,863191,692
Median search, msSciFact1.0573.735
NFCorpus0.8072.584
Heap and external memory, MBSciFact34.110.5
NFCorpus32.47.2

Ranking quality

Human relevance judgements on SciFact score each engine's top ten results.

Ranking quality, Ranking quality
MeasureCorpusNarsilOrama
nDCG@10SciFact0.6840.435

Saving and loading

Each engine saves its largest index in its standard save format, then loads the saved copy and answers a search.

Saving and loading, Saving and loading
MeasureCorpusNarsilOrama
Saved size, MB50,000 documents70.1193.8
Save, ms50,000 documents1,3352,081
Load and first search, ms50,000 documents5323,389

Changing documents

Each engine removes a slice of its largest index, answers a search, and inserts the same number of documents again.

Changing documents, Changing documents
MeasureCorpusNarsilOrama
Documents removed a second50,000 documents7,9294,759
Search after removal, ms50,000 documents0.19117.237
Documents inserted again a second50,000 documents9,7233,643

Where Narsil is better

  • Narsil keeps each index durable with a write-ahead log and checkpoints.
  • Narsil packages for Python, Go, and Rust read the same index format, so services outside JavaScript can search the same index.
  • Narsil shards a large index across partitions and worker threads, then merges the results from every shard into one ranked list.

Of the 30 measurements that the harness recorded for both engines, Narsil came out ahead in 24 and Orama in 4, while 2 came out level.

A measure is level when the tables above show the same figure for both engines.

Where Orama is better

  • Orama is written entirely in TypeScript with no native code, so one build works in every JavaScript runtime, while Narsil loads a native core outside the browser.
  • Orama's plugin system adds features such as analytics and embeddings without changes to the core engine.

Measurements that Orama won

Try Narsil

When you paste this prompt into your coding agent, the agent will install the Narsil skill and the package, then build and test the search that your project needs.

See what your agent does with it

If you prefer to write the code yourself, you can use the Narsil package for TypeScript, Python, Go, or Rust, since every package searches with the same engine. Each program indexes three films and finds the films from 1990 onwards whose title matches ronin, before it finds the two films whose embeddings are closest to a query vector.

Serve Narsil over HTTP
pnpm add @delali/narsil
import { createNarsil } from '@delali/narsil'
 
const narsil = await createNarsil()
 
await narsil.createIndex('films', {
  schema: { title: 'string', year: 'number', embedding: 'vector[3]' },
})
 
await narsil.insertBatch('films', [
  { id: 'heat', title: 'Heat', year: 1995, embedding: [0.9, 0.1, 0.2] },
  { id: 'ronin', title: 'Ronin', year: 1998, embedding: [0.8, 0.3, 0.1] },
  { id: 'solaris', title: 'Solaris', year: 1972, embedding: [0.1, 0.9, 0.7] },
])
 
const keyword = await narsil.query('films', { term: 'ronin', filters: { fields: { year: { gte: 1990 } } } })
console.log(keyword.count, keyword.hits[0].id)
 
const nearest = await narsil.query('films', {
  vector: { field: 'embedding', value: [0.85, 0.2, 0.15] },
  limit: 2,
})
for (const hit of nearest.hits) {
  console.log(hit.id, hit.score)
}
 
await narsil.shutdown()

Reproduce these numbers

The benchmark harness is in the Narsil repository, where it writes every figure that it measures into a new run directory.

git clone https://github.com/assetcorp/narsil.git
cd narsil
pnpm install
pnpm run build
pnpm --filter benchmarks bench