Skip to main content

Efficient circular buffer implementation in Python with optional Numba JIT compilation

Project description

Tests PyPi

Efficient circular buffer implementation in Python with optional Numba JIT compilation

Usage

import circular_buffer

buffer_of_int_type = circular_buffer.for_instances_like(123)
buf = buffer_of_int_type(size = 10, autoexpand = True)
for i in range(12):
    buf.push_back(i)
assert buf.pop_front() == 0
assert buf.front() == 1
assert buf.back() == 11

Remember to install numba JIT compiler package to get a small extra speedup. numba can be automatically installed if you install this package via pip install circular-buffer[numba].

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

circular-buffer-0.2.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

circular_buffer-0.2.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file circular-buffer-0.2.0.tar.gz.

File metadata

  • Download URL: circular-buffer-0.2.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.1

File hashes

Hashes for circular-buffer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 32f563f1bda03f863a5e881a0e2d6faac6b71de922ea6c24888150c377c70f73
MD5 297b592d493fa9f0e28d410348a057d9
BLAKE2b-256 89c2b7ff5251a874e1fd7790e8c46fdc87011cfd73b3fdc03091e22075ea00d9

See more details on using hashes here.

File details

Details for the file circular_buffer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: circular_buffer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.1

File hashes

Hashes for circular_buffer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26678b4f49a335595487f6610a5f936aa61928538e73ef3d05aebc3f1f0227d1
MD5 451dfc2906459f414e59d744e3a68d10
BLAKE2b-256 bebfdd3b80371c40eb251b8cef251c52e8ab8528b38b98a9c7fb0ab6e1ff1182

See more details on using hashes here.

Supported by

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