Skip to content

Repository files navigation

circular-buffer

TestsPyPi

Efficient circular buffer implementation in Python with optional Numba JIT compilation

Usage

importcircular_bufferbuffer_of_int_type=circular_buffer.for_instances_like(123)
buf=buffer_of_int_type(size=10, autoexpand=True)
foriinrange(12):
buf.push_back(i)
assertbuf.pop_front() ==0assertbuf.front() ==1assertbuf.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].

About

Efficient circular buffer implementation in Python with optional Numba JIT compilation

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages