A million rows, sorted, filtered, found and edited.

500× faster sorting, filtering in JavaScript. An instant upgrade for your tables.

Works with

Plain JS
Running in your browser
… Loading 100,000 rows
Building typed columns…
The real engine, bundled into this page: 10.7 KB gzippedClick a column to sort

Drop it into the table you already have.

No rewrite. UI kit users change nothing. Same rows, same order, a new engine underneath.

UI kit DataTable

Upgrade the package. Your call site stays the same; large tables switch to the engine on their own.

<DataTable
  columns={columns}
  data={lots}
  enableSorting
  getRowId={(lot) => lot.id} // optional/>

Table v9

Add one feature and one row model. Your columns, cells and state stay as they are.

import { columnarFeature, createColumnarCoreRowModel }
  from '@tetrascience-npm/tesseract-tables/tanstack';

tableFeatures({
  rowSortingFeature, columnFilteringFeature,
  columnarFeature,
  coreRowModel: createColumnarCoreRowModel(),
});

Community

Swap in one datasource. AG Grid keeps its columns, cell renderers and filter UI.

import { createColumnarDatasource }
  from '@tetrascience-npm/tesseract-tables/ag-grid';

createGrid(el, {
  rowModelType: 'infinite',
  datasource: createColumnarDatasource(engine, rows),
});

Measured, not estimated

Up to 500× faster.

Today’s kit pipeline against the kit on tesseract-tables. Same 10-column dataset, same session.

Node 22 on a 4-core 2.1 GHz VM.

Operation
Rows

506×faster, sorting 100,000 rows by sample ID

Rows, without the rows.

Each column is stored in one typed array; text becomes small codes.

Sorts that never compare.

No two values are ever compared. Each pass drops them into buckets by one digit and reads the buckets back in order.

Same rows. Same order.

An automated parity test runs the engine and stock TanStack v9 on the same table state, at 5,000 and 100,000 rows.

One documented difference: empty values sort last in both directions. Columns with their own sort or filter functions stay on TanStack’s row models.

15 / 15checks pass

  • 8/8SortingNumbers, dates, text IDs, categories, booleans, two columns and the default order.
  • 5/5Filtering and searchLists, number ranges, booleans, global search, and all of them together.
  • 1/1EditingA cell edited while sorted shows its new value in the right place.
  • 1/1GuardrailsA custom filter function is refused, never silently ignored.

AG Grid, 20× faster at a million rows.

AG Grid keeps its own UI. The engine answers its sort and filter model from typed arrays.

Click to painted rows in Chromium 141, AG Grid Community 36.2. Its own client-side row model against the columnar datasource. Logarithmic axis.

One install. Every grid.

One package upgrades every grid in an existing codebase.

npm install @tetrascience-npm/tesseract-tables
  • @tetrascience-npm/tesseract-tablesThe engine. No dependencies. Plain JavaScript or any grid.
  • …/tanstackTanStack Table v9 feature and core row model.
  • …/tanstack/reactTanStack Virtual window helper for React.
  • …/ag-gridAG Grid Community Infinite Row Model datasource.
import { createTypedArrayEngine } from '@tetrascience-npm/tesseract-tables';

const engine = createTypedArrayEngine(rows, columns);
const { order } = engine.run({ sort: [{ field: 'ic50', desc: true }], predicates: [] });
// order: row positions. 1M rows, filter + sort: 142 ms.

A cousin of the UI kit.

Same npm scope, same license. Built to work under the kit’s DataTable, and open to every team that works with large tables.

@tetrascience-npmone npm scope · Apache-2.0

The UI kit

Public on npm

@tetrascience-npm/tetrascience-react-ui

The components, charts and DataTable your apps already use.

  • Repo ts-lib-ui-kit
  • License Apache-2.0

The engine

New

@tetrascience-npm/tesseract-tables

Typed-array sorting and filtering under the kit’s DataTable, and for any other grid.

Also for TanStack, AG Grid and plain JS
  • Repo ts-lib-tesseract-tables
  • License Apache-2.0