Skip to main content

No project description provided

Project description

Python math library written in Rust

Work in progress

Examples

Sum of two 32-bit integer array

from rem_math import rem_math as rm

array = [i for i in range(100_000_000)]
sum_two_i32_result = rm.sum_two_ints32(array, array, simd=True)

print(sum_two_i32_result)

Benchmarks (Python)

Accamulate array values of integer32

--------------------------------------- benchmark 'arr_i32': 1 tests ---------------------------------------
Name (time in ms)        Min     Max    Mean  StdDev  Median     IQR  Outliers       OPS  Rounds  Iterations
------------------------------------------------------------------------------------------------------------
test_sum_arr_i32      4.2611  4.4810  4.3450  0.0814  4.3310  0.0625       2;1  230.1495       5         100
------------------------------------------------------------------------------------------------------------

---------------------------------------- benchmark 'arr_i32_simd': 1 tests -----------------------------------------
Name (time in us)            Min     Max    Mean  StdDev  Median     IQR  Outliers  OPS (Kops/s)  Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------
test_sum_arr_i32_simd     1.1802  1.2003  1.1903  0.0071  1.1903  0.0051       2;0      840.1472       5      100000
--------------------------------------------------------------------------------------------------------------------

---------------------------------------- benchmark 'numpy': 1 tests ----------------------------------------
Name (time in ms)        Min     Max    Mean  StdDev  Median     IQR  Outliers       OPS  Rounds  Iterations
------------------------------------------------------------------------------------------------------------
test_numpy_sum        7.6939  7.8477  7.7710  0.0544  7.7710  0.0387       2;0  128.6840       5          13
------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

Benchmarks (Rust)

Accamulate array values of integer32

Array accumulation      time:   [15.509 µs 15.532 µs 15.575 µs]
Found 11 outliers among 100 measurements (11.00%)
  1 (1.00%) low mild
  3 (3.00%) high mild
  7 (7.00%) high severe

Array accumulation with SIMD instructions
                        time:   [77.083 ns 77.499 ns 78.264 ns]
Found 9 outliers among 100 measurements (9.00%)
  2 (2.00%) high mild
  7 (7.00%) high severe

Roadmap

  • Add GPU-accelerated operations for improved performance.
  • Implement own custom type objects for best performance from ecosystem.
  • Expand mathematical functionality with additional features and algorithms.

Stay tuned for updates as the library evolves!

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

rem_math-0.1.1.tar.gz (25.4 kB view details)

Uploaded Source

Built Distributions

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

rem_math-0.1.1-cp313-cp313-win_amd64.whl (131.6 kB view details)

Uploaded CPython 3.13Windows x86-64

rem_math-0.1.1-cp312-cp312-win_amd64.whl (132.1 kB view details)

Uploaded CPython 3.12Windows x86-64

rem_math-0.1.1-cp311-cp311-win_amd64.whl (132.6 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file rem_math-0.1.1.tar.gz.

File metadata

  • Download URL: rem_math-0.1.1.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for rem_math-0.1.1.tar.gz
Algorithm Hash digest
SHA256 671e3534432c4ab05907ab66818a844845867e716f8deef42273f6de53370e7f
MD5 9d79de5b99d52738b8e53f70ed3aa997
BLAKE2b-256 eeeff2b28bbb76048dcb4a8df77b5ded348a936a0bcd453ef786fadd202bb939

See more details on using hashes here.

File details

Details for the file rem_math-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for rem_math-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9006c7c701f3136746b51fd8fa8c4faa5d8309061d85446f14f2ff0ac8d8bdcd
MD5 dd96c5f33d36918b1ea9a0a7ef394eab
BLAKE2b-256 ea65e8468abecd838b3c1036da3ec3ad703b053d0e187cb3632e658dd0f0785a

See more details on using hashes here.

File details

Details for the file rem_math-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for rem_math-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d8a1a96e723dc155ab23c0853624f379e27109e22865201504ef61813211d5d9
MD5 80bcac60410d47e7b4275bacf7fc85f6
BLAKE2b-256 ed9f93973891b3a0a033a620583440d49f54e0fffad9b5ae34b5fd0458a53f48

See more details on using hashes here.

File details

Details for the file rem_math-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for rem_math-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a956d09924b8cbb15f0f7513db4d6c64560d440ba1503f5dd6fcbb9f2fa48f5f
MD5 997a528121f6ec24c1b5548b988bb085
BLAKE2b-256 4f9f59063613970f0014d526349581cb408aee5ab30c35c85ee9449835abfe8a

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