Skip to main content

Ultra-accelerating decorator for scientific and numerical Python functions.

Project description

AgLight

AgLight is a Python module that provides an ultra-accelerating decorator for scientific and numerical functions. It automatically uses Numba JIT compilation and parallelization if available, or falls back to multiprocessing for heavy computations if Numba is not installed.

Features

  • @light decorator: Accelerates your functions with minimal code changes.
  • Uses Numba JIT and parallelization for optimal speed.
  • Falls back to multiprocessing for large workloads if Numba is unavailable.
  • Simple API: just decorate your function with @light.

Installation

pip install AgLight

Usage

from AgLight import light

@light
def my_heavy_function(n):
    total = 0
    for i in range(n):
        total += i * i
    return total

print(my_heavy_function(1000000))

Requirements

  • Python 3.7+
  • numpy
  • (Optional) numba for maximum acceleration

License

MIT

Project details


Download files

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

Source Distribution

aglight-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

aglight-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file aglight-0.1.0.tar.gz.

File metadata

  • Download URL: aglight-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for aglight-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0dde53787237dadcfee8af8d959c08fbcdb9f54084dfb17a815b99f6337b425c
MD5 e639399b7b060c0056ad0b8a6dc75233
BLAKE2b-256 da8fafcc486d7533d06a4a913511a8b84e725db90528d27912a5dc865306bb77

See more details on using hashes here.

File details

Details for the file aglight-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aglight-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for aglight-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cf8cdafe4e50fd44d6f2ab50e0d10a264a988d37f8d9915f66ac5bea41b4d67
MD5 9ed411a4d7c0c2c52727778fa8509638
BLAKE2b-256 525b3a0e5e4f61634d1dc8e9a624ef7231bd7bf5e6dbbc6b85c2a46ab2a07104

See more details on using hashes here.

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