Skip to content

Version 3.1.1

Choose a tag to compare

@thednp thednp released this 05 Aug 10:12
· 2 commits to master since this release

What Changed

Added

  • pnpm bench:docs (scripts/update-benchmark.js): runs both bench suites twice, parses the printed tables, writes test/fixtures/bench-results.json, and regenerates the BENCHMARK.md tables and the README ## Benchmarks summary from it — no more hand-transcribing benchmark numbers.

Changed

  • The full benchmark report moved out of the README into a dedicated BENCHMARK.md (static methodology intro and conclusion, with the two result tables wrapped in <!-- b1 --> / <!-- /b1 --> and <!-- b2 --> / <!-- /b2 --> markers). The README ## Benchmarks section is now a short summary — a one-line "X–Yx faster than the previous release / than native" range plus a link to BENCHMARK.md — so it keeps the attention on the big picture instead of the per-operation numbers.
  • setMatrixValue() now mutates the matrix in place and returns this, matching the native DOMMatrix.setMatrixValue() (previously it returned a new matrix and left the original untouched). The fromArray() / fromMatrix() value writers now accept an optional target instance, so the array / object paths of setMatrixValue() write straight into the existing instance instead of allocating a new one. Both benchmark suites gained setMatrixValue() operations to cover the new path: array and transform-list inputs against the 3.0.x snapshot, and a parity-checked transform-list case against native (the native parity suite now covers 22 operations).

Fixed

  • The native benchmark's transformPoint case measured asymmetric work: the shim side constructed the matrix from a transform string on every iteration while the native side reused a pre-built DOMMatrix. Both sides now pre-build the matrix, and the corrected measurement is ~11x shim-faster on transformPoint (previously reported as ~0.36x native-faster, see the 3.1.0 entry above); test/fixtures/bench-results.json, the BENCHMARK.md tables and the README ## Benchmarks summary were regenerated with pnpm bench:docs.

Full Changelog: 3.1.0...3.1.1