Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mljs/spectra-processing
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: xyArrayAlign
Choose a base ref
...
head repository: mljs/spectra-processing
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 12 commits
  • 51 files changed
  • 4 contributors

Commits on Sep 10, 2026

  1. feat: add xysFilter

    lpatiny committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    01a1b16 View commit details
    Browse the repository at this point in the history
  2. feat: add xyArrayMaxY

    lpatiny committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    7c8ac24 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ebb471 View commit details
    Browse the repository at this point in the history
  4. feat: add isLittleEndian

    lpatiny committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    6890764 View commit details
    Browse the repository at this point in the history
  5. feat: add xGetSortOrder and xGetApproximateSortOrder

    Radix sort over the bits of each double, so the cost is a fixed number of
    linear passes instead of n log n comparisons. Measured against a comparator
    sort of an index array (benchmark.js, minSamples 30, random doubles, ns per
    element, node 26):
    
              n   comparator   xGetSortOrder   xGetApproximateSortOrder
             50         69.8     78.8 (0.9x)                46.3 (1.5x)
           1000        122.5     25.4 (4.8x)                13.9 (8.8x)
         100000        230.9     24.0 (9.6x)                 9.3 (24.8x)
        1000000        290.4     23.0 (12.6x)                9.6 (30.3x)
    
    xGetSortOrder keys on all 64 bits and orders exactly, NaN, infinities,
    subnormals and the two zeros included. xGetApproximateSortOrder keys on the
    high word only, halving the passes, and orders to 20 bits of relative
    precision. The digit is 8 bits below 65536 values and 16 above, which keeps
    the O(radix) counting pass from dominating short arrays.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    lpatiny and claude committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    f087036 View commit details
    Browse the repository at this point in the history
  6. feat: add xDoubleTypedArrayLength

    A typed array cannot be resized, so a buffer of unknown size has to allocate a
    longer one and copy into it. Doubling keeps the total cost of filling it linear,
    and an empty array becomes one element long so that doubling makes progress.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    lpatiny and claude committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    3b5f34d View commit details
    Browse the repository at this point in the history
  7. feat: add xyArrayAlignByIntensity and xyArrayMergeByIntensity

    Align and merge centroided spectra around the most intense peaks: the strongest
    peak of the whole set opens a slot and takes every peak within delta of it, the
    strongest of the rest opens the next, and so on. A slot therefore never grows
    wider than 2 * delta, where a chain of close neighbours can. Merge keeps only the
    common peaks, so it scales where the dense alignment matrix does not.
    
    mergeSortedXY picks its strategy from the number of spectra: a binary heap costs
    O(log k) per point, ordering the concatenated points costs the same whatever k is,
    and the two meet at thirty spectra (benchmark/mergeSortedXY.ts, 2M points,
    ns per point):
    
      spectra      heap   sorting
            5      13.6      23.2
           15      21.1      23.8
           30      25.9      23.9
          100      33.1      21.7
         1000      55.3      22.1
         5000      67.8      23.4
    
    30000 spectra of 1000 peaks merge into 7141 slots in 2.1s.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    lpatiny and claude committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    9c11817 View commit details
    Browse the repository at this point in the history
  8. chore: add a benchmark for the shapes xGetSortOrder can order

    node 26 / bun 1.3, ns per point at n = 1M: permuting x and y 555 -> 29,
    ordering points 445 -> 28, the nth largest y 70 -> 24, sorted values 70 -> 20.
    lpatiny committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    9087fd7 View commit details
    Browse the repository at this point in the history
  9. perf: order xySortX and xyObjectSortX through xGetSortOrder

    ns per point on node, from n = 1000 to n = 1M: xySortX 118 -> 41 and
    555 -> 29, xyObjectSortX 102 -> 42 and 445 -> 28. Below 256 values the
    comparator still wins, so it stays.
    lpatiny committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    9c744b6 View commit details
    Browse the repository at this point in the history
  10. chore(main): release 14.35.0

    mljs-bot authored and lpatiny committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    e07ca79 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2026

  1. Configuration menu
    Copy the full SHA
    4d0c22a View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2026

  1. Configuration menu
    Copy the full SHA
    0d5e0e2 View commit details
    Browse the repository at this point in the history
Loading