rust-itertools


Namerust-itertools JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryRun Rusts itertools and more in Python.
upload_time2025-01-04 19:17:29
maintainerNone
docs_urlNone
authorBert de Bruijn
requires_python>=3.10
licenseMIT
keywords itertools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rust_itertools
Experimental repo to run Rusts itertools in Python.

## Setup
Initially, this will be mostly used as a proof of concept. This is to investigate the comparisons between:
- rust's itertools functionality vs python's itertools functionality
- rust's itertools functionality vs more_itertools functionality
- new rust functions vs more_itertools functionality
- new rust functions vs new python functions around itertools

Practically, this means not all functionality from rust's itertools will be available

## Notes on reasons to use this repository
Often, the major goal of porting Rust functionality over to Python is for speed. So far, my initial experimentation
has shown that that gain is very low (or even non-existant) due to 2 main reasons:
- `itertools` is mostly written in C so already quite fast and roughly on par with Rust
- even for `more_itertools` and new python functions: not having to copy over the results back to Python is a major gain
    vs the rust implementations for the type of functions we deal with here. Example: there are over 36 million
    permutations of the numbers 0 to 9 (incl 9). Generating in Rust and then accessing from Python takes 2.24 seconds
    on my pc, where the CPython itertools takes 0.557 seconds to do the same.

There are some exceptions though, especially for:
- newly written Python code that is not in CPython (both `more_itertools` and additional functions in this repo)
- situations where the Rust compiler can work wonders in reducing logic down to more direct logic
- some tools for which the ratio of compute vs iteration is not as much towards iteration

Next to this, you can use this repository for functionality not available in Python's `itertools` or if you prefer
the way the Rust version is setup.

## Acknowledgements
The Github Actions setup to automatically crossbuild Python packages across operating systems has been based on the
setup in the [rtoml](https://github.com/samuelcolvin/rtoml) project (although first using the old `setuptools` based
setup, because of the link on the `setuptools-rust` page..).

Of course, also credit to the Rust `itertools` [project](https://github.com/rust-itertools/itertools) and inspiration
from the [more-itertools](https://github.com/more-itertools/more-itertools) and of course the core Python itertools
projects.

## Some big ideal TODO's
- Add support for all functionality of any of the `itertools` packages
- Make both a tuple and a list version of each method where applicable
- Make an iterable PyClass (see https://pyo3.rs/v0.22.3/class/protocols#iterable-objects) that can be reused


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rust-itertools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "itertools",
    "author": "Bert de Bruijn",
    "author_email": "Bert de Bruijn <lpdebruijn@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f0/9b/88c96101dc3f5786d83fac4422dcecd35e5d6996b43a9776b6acc067ccaf/rust_itertools-0.0.1.tar.gz",
    "platform": null,
    "description": "# rust_itertools\nExperimental repo to run Rusts itertools in Python.\n\n## Setup\nInitially, this will be mostly used as a proof of concept. This is to investigate the comparisons between:\n- rust's itertools functionality vs python's itertools functionality\n- rust's itertools functionality vs more_itertools functionality\n- new rust functions vs more_itertools functionality\n- new rust functions vs new python functions around itertools\n\nPractically, this means not all functionality from rust's itertools will be available\n\n## Notes on reasons to use this repository\nOften, the major goal of porting Rust functionality over to Python is for speed. So far, my initial experimentation\nhas shown that that gain is very low (or even non-existant) due to 2 main reasons:\n- `itertools` is mostly written in C so already quite fast and roughly on par with Rust\n- even for `more_itertools` and new python functions: not having to copy over the results back to Python is a major gain\n    vs the rust implementations for the type of functions we deal with here. Example: there are over 36 million\n    permutations of the numbers 0 to 9 (incl 9). Generating in Rust and then accessing from Python takes 2.24 seconds\n    on my pc, where the CPython itertools takes 0.557 seconds to do the same.\n\nThere are some exceptions though, especially for:\n- newly written Python code that is not in CPython (both `more_itertools` and additional functions in this repo)\n- situations where the Rust compiler can work wonders in reducing logic down to more direct logic\n- some tools for which the ratio of compute vs iteration is not as much towards iteration\n\nNext to this, you can use this repository for functionality not available in Python's `itertools` or if you prefer\nthe way the Rust version is setup.\n\n## Acknowledgements\nThe Github Actions setup to automatically crossbuild Python packages across operating systems has been based on the\nsetup in the [rtoml](https://github.com/samuelcolvin/rtoml) project (although first using the old `setuptools` based\nsetup, because of the link on the `setuptools-rust` page..).\n\nOf course, also credit to the Rust `itertools` [project](https://github.com/rust-itertools/itertools) and inspiration\nfrom the [more-itertools](https://github.com/more-itertools/more-itertools) and of course the core Python itertools\nprojects.\n\n## Some big ideal TODO's\n- Add support for all functionality of any of the `itertools` packages\n- Make both a tuple and a list version of each method where applicable\n- Make an iterable PyClass (see https://pyo3.rs/v0.22.3/class/protocols#iterable-objects) that can be reused\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Run Rusts itertools and more in Python.",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://gitlab.com/bert.debruijn/rust_itertools",
        "Issues": "https://gitlab.com/bert.debruijn/rust_itertools/-/issues"
    },
    "split_keywords": [
        "itertools"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02bc92623136679cff94f8497c7fca192fdd13667f9c76ba8e176d33e3c3035b",
                "md5": "2fe8665b97048a4d2838387fdcc41ca5",
                "sha256": "b4dba67675754464e607efd7c083bee72d776beb5da849a615b7e5e82142e980"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2fe8665b97048a4d2838387fdcc41ca5",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 223434,
            "upload_time": "2025-01-04T19:16:55",
            "upload_time_iso_8601": "2025-01-04T19:16:55.766070Z",
            "url": "https://files.pythonhosted.org/packages/02/bc/92623136679cff94f8497c7fca192fdd13667f9c76ba8e176d33e3c3035b/rust_itertools-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb3907894d3896af38fa8ede30202d27ef884f9d19da8fa0523aae38da2e78e3",
                "md5": "05c86f40c766e8927a1a963135774f66",
                "sha256": "603c8cfcca90ab9471a93d9b797ef45d7f863c4a96939d5d02ba80ac24d65f36"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "05c86f40c766e8927a1a963135774f66",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 218703,
            "upload_time": "2025-01-04T19:16:58",
            "upload_time_iso_8601": "2025-01-04T19:16:58.750953Z",
            "url": "https://files.pythonhosted.org/packages/cb/39/07894d3896af38fa8ede30202d27ef884f9d19da8fa0523aae38da2e78e3/rust_itertools-0.0.1-cp310-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a08a92652051d23c4bc3e0a5607984f9a5bff61c74ece4d693260fcae245586",
                "md5": "6fbc6de971e05e95b5135cddc51ec0cf",
                "sha256": "b2318e954e8df3a8019d1a70240f2d5ce9236fbe1d2ed4655c58ce4513c1ed3c"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "6fbc6de971e05e95b5135cddc51ec0cf",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 252737,
            "upload_time": "2025-01-04T19:17:01",
            "upload_time_iso_8601": "2025-01-04T19:17:01.608524Z",
            "url": "https://files.pythonhosted.org/packages/1a/08/a92652051d23c4bc3e0a5607984f9a5bff61c74ece4d693260fcae245586/rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f76d116abeafff3ce7c66651b8feff44e42f6087492ae59518de39d7e0655c8",
                "md5": "41bb2cf90789027c41cb2c718d6c030d",
                "sha256": "5b0f5e4655ecfb1109b09e9088f8b8b959e06e73022c61d82d789a1ca483affe"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "41bb2cf90789027c41cb2c718d6c030d",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 258792,
            "upload_time": "2025-01-04T19:17:04",
            "upload_time_iso_8601": "2025-01-04T19:17:04.366811Z",
            "url": "https://files.pythonhosted.org/packages/1f/76/d116abeafff3ce7c66651b8feff44e42f6087492ae59518de39d7e0655c8/rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e5fcb1344fbda13f061ba0922cb829ec7859cac585ba2e80edcfac8fd8a669f",
                "md5": "5cbabe137a258f29cae649debb90a78e",
                "sha256": "0ec95e7430c378b89a421bbe676790d9c4d9580c1dfc16b93f2c1ab26bc8d088"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "5cbabe137a258f29cae649debb90a78e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 294731,
            "upload_time": "2025-01-04T19:17:07",
            "upload_time_iso_8601": "2025-01-04T19:17:07.082945Z",
            "url": "https://files.pythonhosted.org/packages/8e/5f/cb1344fbda13f061ba0922cb829ec7859cac585ba2e80edcfac8fd8a669f/rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d7db82e48b1b369caf365f0c29436c6dd47f763edbe956a652401fd994fd3a30",
                "md5": "48178171c250019941c7c2ff90a11f4f",
                "sha256": "7cf783efa05ac526e18f647e337ad096e47443c496b3a18c93ec42b3382d41aa"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "48178171c250019941c7c2ff90a11f4f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 294434,
            "upload_time": "2025-01-04T19:17:10",
            "upload_time_iso_8601": "2025-01-04T19:17:10.915112Z",
            "url": "https://files.pythonhosted.org/packages/d7/db/82e48b1b369caf365f0c29436c6dd47f763edbe956a652401fd994fd3a30/rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1529858ea49f478e1cbae0a1a75c343cbc3e6e5a037e30312068c3d3d2e26718",
                "md5": "ddc25d1d0dcf9602180589609e3fef88",
                "sha256": "152ebce6fb9d6637b0547eb0d762daa4f01f23604e8c0e709cc29948012c000f"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ddc25d1d0dcf9602180589609e3fef88",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 254709,
            "upload_time": "2025-01-04T19:17:13",
            "upload_time_iso_8601": "2025-01-04T19:17:13.542354Z",
            "url": "https://files.pythonhosted.org/packages/15/29/858ea49f478e1cbae0a1a75c343cbc3e6e5a037e30312068c3d3d2e26718/rust_itertools-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "611e283e03eae85ad6a01126aed1e32096a85f98eb2bbfcbe070d7bf8e511a87",
                "md5": "c199d46e58f6ae101b13ba3b39c974bc",
                "sha256": "9d6d4e4c540c92ff94537485969b8c3e866dfd245bb07ce27cf7756687024e11"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
            "has_sig": false,
            "md5_digest": "c199d46e58f6ae101b13ba3b39c974bc",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 271011,
            "upload_time": "2025-01-04T19:17:15",
            "upload_time_iso_8601": "2025-01-04T19:17:15.075532Z",
            "url": "https://files.pythonhosted.org/packages/61/1e/283e03eae85ad6a01126aed1e32096a85f98eb2bbfcbe070d7bf8e511a87/rust_itertools-0.0.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac6403f37fce0284654d95ff97493867934af71c2e586d06045663260b2eb887",
                "md5": "a3647d0fda7dc1f0d1805f92e8a61376",
                "sha256": "6cb3ad03705e3621a503c543800735c4d26742acb6a8a6a08f9b0eb974dc8e2f"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-musllinux_1_1_aarch64.whl",
            "has_sig": false,
            "md5_digest": "a3647d0fda7dc1f0d1805f92e8a61376",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 430716,
            "upload_time": "2025-01-04T19:17:17",
            "upload_time_iso_8601": "2025-01-04T19:17:17.978359Z",
            "url": "https://files.pythonhosted.org/packages/ac/64/03f37fce0284654d95ff97493867934af71c2e586d06045663260b2eb887/rust_itertools-0.0.1-cp310-abi3-musllinux_1_1_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6386cc9a9005329c40c237a11cb12a924b7ff00dc1ab98d9d040245a4514829d",
                "md5": "193111f175d315863e8448900b962fd7",
                "sha256": "0bfbf623b1fce6e351af9ba86a4e323131e0354d68afef06307adcffe33c7601"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-musllinux_1_1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "193111f175d315863e8448900b962fd7",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 425138,
            "upload_time": "2025-01-04T19:17:20",
            "upload_time_iso_8601": "2025-01-04T19:17:20.823778Z",
            "url": "https://files.pythonhosted.org/packages/63/86/cc9a9005329c40c237a11cb12a924b7ff00dc1ab98d9d040245a4514829d/rust_itertools-0.0.1-cp310-abi3-musllinux_1_1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "734324d45af37ea90c8cada733d1fe69c72d9abd3d983529f0b8c3a10205d11f",
                "md5": "31a4f62f6f1a1c2f6ce198a8b3430b0c",
                "sha256": "be9266373253bd03c228e480859ceb56829e1f41f3955f0e115f324cb2d3e352"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-win32.whl",
            "has_sig": false,
            "md5_digest": "31a4f62f6f1a1c2f6ce198a8b3430b0c",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 114738,
            "upload_time": "2025-01-04T19:17:23",
            "upload_time_iso_8601": "2025-01-04T19:17:23.535183Z",
            "url": "https://files.pythonhosted.org/packages/73/43/24d45af37ea90c8cada733d1fe69c72d9abd3d983529f0b8c3a10205d11f/rust_itertools-0.0.1-cp310-abi3-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8999a3c048362d8dc96c8c3eeb10f5c92eeb8b17a0ecabf9f393827502b8b70e",
                "md5": "f10bf7041f55580039b14df72a8b2f84",
                "sha256": "40de4680917a141e0aea1a687f6b69fcb7e4a812db211a19064a3b0a84e31971"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f10bf7041f55580039b14df72a8b2f84",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 121518,
            "upload_time": "2025-01-04T19:17:24",
            "upload_time_iso_8601": "2025-01-04T19:17:24.871578Z",
            "url": "https://files.pythonhosted.org/packages/89/99/a3c048362d8dc96c8c3eeb10f5c92eeb8b17a0ecabf9f393827502b8b70e/rust_itertools-0.0.1-cp310-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8fc8e55d4a98a86fe63dd1ee1600ad881ccfa01f56a247f6477693af43784121",
                "md5": "8e12ea109500741845f31b562a38a655",
                "sha256": "3ce8a6d93eff6b8484aa4a5e7449fe62594bec6ff3fa6bc7af0b5bcbf3f43ada"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1-cp310-abi3-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "8e12ea109500741845f31b562a38a655",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 117791,
            "upload_time": "2025-01-04T19:17:28",
            "upload_time_iso_8601": "2025-01-04T19:17:28.056385Z",
            "url": "https://files.pythonhosted.org/packages/8f/c8/e55d4a98a86fe63dd1ee1600ad881ccfa01f56a247f6477693af43784121/rust_itertools-0.0.1-cp310-abi3-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f09b88c96101dc3f5786d83fac4422dcecd35e5d6996b43a9776b6acc067ccaf",
                "md5": "296ac2f6bcc13dcd0c9f3f508aaa1eff",
                "sha256": "b22ae2f1b35c376977209903237d946ee662c0ed206ab555cc6aa2c5f4f3283c"
            },
            "downloads": -1,
            "filename": "rust_itertools-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "296ac2f6bcc13dcd0c9f3f508aaa1eff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 29372,
            "upload_time": "2025-01-04T19:17:29",
            "upload_time_iso_8601": "2025-01-04T19:17:29.428365Z",
            "url": "https://files.pythonhosted.org/packages/f0/9b/88c96101dc3f5786d83fac4422dcecd35e5d6996b43a9776b6acc067ccaf/rust_itertools-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-04 19:17:29",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "bert.debruijn",
    "gitlab_project": "rust_itertools",
    "lcname": "rust-itertools"
}
        
Elapsed time: 0.38448s