Skip to main content

No project description provided

Project description

NumbDuck

Adapting DuckDB database API to the Numba JIT context.

Leverages bindings toolkit in the NumbOx project.

Inspired by the NumbSQL project.

Examples

Runnable narrative-style examples comparing numbduck against the closest stock DuckDB Python+Arrow approaches live in examples/. Each script is self-contained, generates its own data, and prints the measured numbers.

Highlights:

  • Throughput (haversine.py): JIT chunk callback is ~400× faster than a per-row Python scalar UDF (10K rows) and ~100× faster than a PyArrow expression UDF at 1M rows. The win comes from no Python crossings per chunk and LLVM-fused math with no intermediate arrays.

  • Latency + GIL-free (online_scoring.py): ~2.2× lower per-event latency vs pure-Python conn.execute, and monotonic parallel scaling to ~2.4× on 8 threads while the Python loop plateaus under GIL contention.

  • Branchy logic (fraud_score.py): Arrow's pc.if_else chain beats the Python scalar UDF by ~60× (Arrow is the right stock-DuckDB tool here). The JIT chunk callback then beats Arrow by ~16× at 10K and ~1750× at 1M rows — the gap grows because each Arrow UDF chunk crosses the Python boundary and allocates intermediates, while the JIT computes in registers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numbduck-0.0.1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file numbduck-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: numbduck-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for numbduck-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a26561c6b620544c7088ea224bc50fb8fefc54262321044ba2d11679d45d4f6
MD5 c187a630cabc11b09e99f51a8f8438a4
BLAKE2b-256 695c0e30ef1a3e307dcc16d097d45c9b0cf66359f73f3e9b16f81799af9169ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for numbduck-0.0.1-py3-none-any.whl:

Publisher: release.yml on Goykhman/numbduck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page