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.3-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for numbduck-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 910233f7a732ee202c11804267a460a0f3edb88959ec4872a98cad77890061cd
MD5 8a5b15ad22c0aa3c70fba0559762f372
BLAKE2b-256 b5553bff9ac2c2afafecd8708649e91f8f9e6f9f1ce0515b992362229cb7744c

See more details on using hashes here.

Provenance

The following attestation bundles were made for numbduck-0.0.3-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