Skip to main content

Extensions to standard Python's heapq for performance applications

Project description

This minimalistic CPython extension provides termial random implementation.

See this and this article for more info on termial random.

Basically, the random generator prioritizes numbers closer to 0. See the distribution plotted below for n==10.

Distribution of numbers generated using termial random.

Installation

Simply install this library using pip:

pip install termial-random

Usage

The module provides 3 core routines:

  • termial_random.seed(n) used to initialie glibc random number generator based on n provided

  • termial_random.seed_init() used to initialie glibc random number generator based on the current time

  • termial_random.random(n) used to compute termial random number for the given n

Benchmarks

See this gist with benchmarks.

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

termial-random-0.0.2.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distributions

termial_random-0.0.2-cp38-cp38-manylinux1_x86_64.whl (25.7 kB view hashes)

Uploaded CPython 3.8

termial_random-0.0.2-cp36-cp36m-manylinux2014_x86_64.whl (25.7 kB view hashes)

Uploaded CPython 3.6m

termial_random-0.0.2-cp36-cp36m-manylinux1_x86_64.whl (25.7 kB view hashes)

Uploaded CPython 3.6m

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