Skip to main content

Speedups

https://github.com/wolph/speedups/actions/workflows/build_wheels.yml/badge.svg https://github.com/wolph/speedups/actions/workflows/tox.yml/badge.svg

This library contains a number of functions for speeding up critical parts of your Python code without having to bother with the hassle of building binary extensions. That way you can keep your main packages simple PEP517 based packages and still get the speedups.

Currently only a few functions are available, but several more are planned.

Generic endian conversion functions in speedups.hton:

  • void pack_int16(char *buf, int16_t x)

  • void pack_int32(char *buf, int32_t x)

  • void pack_int64(char *buf, int64_t x)

  • void pack_float(char *buf, float f)

  • void pack_double(char *buf, double f)

  • int16_t unpack_int16(const char *buf)

  • uint16_t unpack_uint16(const char *buf)

  • int32_t unpack_int32(const char *buf)

  • uint32_t unpack_uint32(const char *buf)

  • int64_t unpack_int64(const char *buf)

  • uint64_t unpack_uint64(const char *buf)

  • float unpack_float(const char *buf)

  • double unpack_double(const char *buf)

These functions are used to convert between native and network byte order and are meant to be used from Cython code. Examples can be found in the speedups.psycopg_array code.

For the psycopg library we have a binary COPY loader to convert a PostgreSQL array to a numpy ndarray. This can be used with the copy() method of a psycopg cursor: https://www.psycopg.org/psycopg3/docs/basic/copy.html

It supports the following PostgreSQL types:

  • float4 (numpy.float32)

  • float8 (numpy.float64)

  • smallint (numpy.int16)

  • integer (numpy.int32)

  • bigint (numpy.int64)

Additionally, it supports arrays varying from 1D to N-D so a 2D or 3D array are supported.

cursor: psycopg.Cursor
psycopg_loaders.NumpyLoader.install(cursor)

query = '''
COPY (
    SELECT array_agg(x)
    FROM generate_series(1, 100000) x
) TO STDOUT WITH BINARY
'''

copy: psycopg.Copy
with cursor.copy(query) as copy:
    copy.set_types(['integer[]'])

    for row in copy.rows():
        print(row)

Metadata

Release files for speedups 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for speedups 1.3.2
File Actions
speedups-1.3.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for speedups-1.3.2-cp312-cp312-win_amd64.whl
speedups-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for speedups-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
speedups-1.3.2-cp312-cp312-macosx_10_9_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.9+ x86-64 Details for speedups-1.3.2-cp312-cp312-macosx_10_9_x86_64.whl
speedups-1.3.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for speedups-1.3.2-cp311-cp311-win_amd64.whl
speedups-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for speedups-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
speedups-1.3.2-cp311-cp311-macosx_12_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 12.0+ x86-64 Details for speedups-1.3.2-cp311-cp311-macosx_12_0_x86_64.whl
speedups-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details for speedups-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl
speedups-1.3.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for speedups-1.3.2-cp310-cp310-win_amd64.whl
speedups-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for speedups-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
speedups-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details for speedups-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl
speedups-1.3.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for speedups-1.3.2-cp39-cp39-win_amd64.whl
speedups-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for speedups-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
speedups-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details for speedups-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl
speedups-1.3.2-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for speedups-1.3.2-cp38-cp38-win_amd64.whl
speedups-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for speedups-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
speedups-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details for speedups-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl

Total release size: 6.8 MB

Release files / speedups-1.3.2-cp312-cp312-win_amd64.whl

Download URL speedups-1.3.2-cp312-cp312-win_amd64.whl
Size 263.9 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6ee2dac73ee1144c335ec80a0f9218dcea0f2aae50b9c1c535702bedacbe446b
BLAKE2b-256 checksum
How to use checksums
b9d17096be0824d4f09114321c558935eb15422d955131ce804f6c6840a31c54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL speedups-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 787.5 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8a62c828272d443537601cc5fcab8a99acd68aa33267ff43b23aeb8c3c0aef08
BLAKE2b-256 checksum
How to use checksums
3f3db63c8568082e7ff03edd8a3a4cd8e0e4f12f52dc526af01e2818a041db6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp312-cp312-macosx_10_9_x86_64.whl

Download URL speedups-1.3.2-cp312-cp312-macosx_10_9_x86_64.whl
Size 279.4 kB
Tags CPython 3.12 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
3be38f0ccbf8b275e8234bb85f6fbc079ac15a547de2c90ea54e32cdf70e13b2
BLAKE2b-256 checksum
How to use checksums
932eab0bc0b339badc4c4c875199867d9b9c72466642fc310c666fd8b392b831
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp311-cp311-win_amd64.whl

Download URL speedups-1.3.2-cp311-cp311-win_amd64.whl
Size 263.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5592a4116a35fa685aef2098a09b91e0013993874bef68d7eea568933980409c
BLAKE2b-256 checksum
How to use checksums
557e18377f300f0191288ae683d00c1942ffb1d2d9494066aeb23546cdb2468c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL speedups-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 793.8 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4e43f2d4232c7e4fce7cbbb598799dd398ff58c8c9df3713da23ed23ab891668
BLAKE2b-256 checksum
How to use checksums
da860e88ded6fd0a279daa447a038573d3c2a657a62ff78aaceb87d63bad3c47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp311-cp311-macosx_12_0_x86_64.whl

Download URL speedups-1.3.2-cp311-cp311-macosx_12_0_x86_64.whl
Size 274.6 kB
Tags CPython 3.11 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
4b2f75e6d08dc72562483df9bb905b8df554981e5910724e97a2a4cbbe26cd2f
BLAKE2b-256 checksum
How to use checksums
36664714366ccab753d9a3959601f980f807f1d68c7ce538418be4de49e532d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.3

Release files / speedups-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl

Download URL speedups-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl
Size 276.4 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
10079ab4aee92df45d2a187e701e16e5a48b3747601d6d525e0ab910ea38ba21
BLAKE2b-256 checksum
How to use checksums
4197ed9dd2292f839ceb447b13a89862be49da3f5dab09d9936fa5297a272040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp310-cp310-win_amd64.whl

Download URL speedups-1.3.2-cp310-cp310-win_amd64.whl
Size 263.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
fa57eeb2fd2298b76c7a47a509e7ab5a784a77414956f56826c17f4665a7eddd
BLAKE2b-256 checksum
How to use checksums
a0af97a458c97148ec5ebcb410698b268fb419eb3d5c7b7a0505463e0c893d0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL speedups-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 743.7 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8fa732f2ca78d85ee7bafd9349cc061da8de2d29964fd1071469f500192ebb34
BLAKE2b-256 checksum
How to use checksums
3e7bc620421c0a262a21b33bb5f8e24e58ec11aef215abc2b177ef051082c1d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl

Download URL speedups-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl
Size 276.8 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
555800c62105b045ace0466d7cb38456f4944019f29e161d3c238cdd83d77ae9
BLAKE2b-256 checksum
How to use checksums
211dfdbd367f7319cced5b0aee06aac00992ae8e4db6f32fed95ac5db84fede9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp39-cp39-win_amd64.whl

Download URL speedups-1.3.2-cp39-cp39-win_amd64.whl
Size 263.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
6c11eeb82c0165f8e160251cbc644a801f5e50cfd473b0ecdb0ae61aad2bceb1
BLAKE2b-256 checksum
How to use checksums
97c5b3a96a42635177d506d4264964e860883afa3e4f69eb0db039d7abf341c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL speedups-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 746.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
84384aaf487a1c5e966785ada1cad79376dc1128b49b392b7906009bf9abd1df
BLAKE2b-256 checksum
How to use checksums
cecafb435d32a394329cdd71abddefd3a3fd17d07f5448c973e8bc12b70dfd19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl

Download URL speedups-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl
Size 277.4 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
9a0147c1277993f02e1a585b6597eddb2f909b6a8c774f402835bbcb129ae4b4
BLAKE2b-256 checksum
How to use checksums
832cc68cf890f689671b0f31f6c5ea819cc6ef9cbde71bf026a518c5c64b5519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp38-cp38-win_amd64.whl

Download URL speedups-1.3.2-cp38-cp38-win_amd64.whl
Size 263.6 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
e86fc61400ad8f7b8fe75acf05f39c4d0cad9a6e2598b1bc0082d6afd37d2014
BLAKE2b-256 checksum
How to use checksums
457bd8f874dd63ea250022b2691b5da6000a72e2a581c873f477b0b9c546cc83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL speedups-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 754.2 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
36f68f17f5b2103d321844998250bc68830d2b7fb7a945bb09195b261d1cf7bf
BLAKE2b-256 checksum
How to use checksums
73ebf6dde75cab9333c8b5d26f2ac5e703239517fa8dc0ad6ae9e66514653899
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / speedups-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl

Download URL speedups-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl
Size 275.7 kB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
e896a2015002302a4cb16fa732da13c9802510c37e6b4d96477fc7ff114d44c0
BLAKE2b-256 checksum
How to use checksums
72b49959f98c07643ccf379ad5807aa868c3765b7130f0ee7dc94160b41b9d32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Security for speedups 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page