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

Uploaded Python 3

File details

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

File metadata

  • Download URL: numbduck-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc97c109061f909096ef316e93c235f4efd8f24a461e7ff438b12c38f3f61aed
MD5 aa7f5bddb97a5533d67ca62396d10c7d
BLAKE2b-256 01d8772e01f7d2618c9d75c260928fbf50161a2452e3595618e4a60165db2003

See more details on using hashes here.

Provenance

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