├── .gitignore ├── .python-version └── list ├── .gitignore ├── .python-version ├── Cargo.lock ├── Cargo.toml ├── Manifest.toml ├── Project.toml ├── README.md ├── README.rst ├── _julia_project.c ├── _julia_project.py ├── list_cy.pyx ├── list_cy_annotations.py ├── list_cy_annotations_c.py ├── list_julia.jl ├── list_julia_threads.jl ├── list_nim.nim ├── list_nim.nim.cfg ├── list_numba.py ├── list_py.py ├── list_py_annotations.py ├── list_py_annotations_c.py ├── list_py_c.py ├── main.py ├── pdm.lock ├── pyproject.toml ├── pyproject.toml.back ├── setup.py ├── simple_list.py ├── src ├── example_package │ └── __init__.py └── list_rust.rs ├── sys_image ├── Project.toml └── packages.jl └── tests └── __init__.py /.gitignore: -------------------------------------------------------------------------------- 1 | list_cy.cpython-39-x86_64-linux-gnu.so 2 | list_cy_annotations.cpython-39-x86_64-linux-gnu.so 3 | list_cy_annotations_c.cpython-39-x86_64-linux-gnu.so 4 | list_py_annotations.cpython-39-x86_64-linux-gnu.so 5 | list_py_annotations_c.cpython-39-x86_64-linux-gnu.so 6 | list_py_c.cpython-39-x86_64-linux-gnu.so 7 | list_cy_annotations_c.c 8 | list_py_annotations_c.c 9 | list_py_c.c 10 | list_cy.cpp 11 | list_cy_annotations.cpp 12 | list_py_annotations.cpp 13 | __pycache__/ 14 | 15 | list_py.cpp 16 | list_py.cpython-39-x86_64-linux-gnu.so 17 | list_cy.c 18 | list_cy_annotations.c 19 | list_py.c 20 | list_py_annotations.c 21 | list_py_c.html 22 | 23 | # Added by cargo 24 | 25 | /target 26 | 27 | setup.cpython-39-x86_64-linux-gnu.so 28 | setup.c 29 | list_rust.cpython-39-x86_64-linux-gnu.so 30 | tags 31 | list_nim.so -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.9.6 2 | -------------------------------------------------------------------------------- /list/.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | .pdm-python 112 | .pdm-build/ 113 | 114 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 115 | __pypackages__/ 116 | 117 | # Celery stuff 118 | celerybeat-schedule 119 | celerybeat.pid 120 | 121 | # SageMath parsed files 122 | *.sage.py 123 | 124 | # Environments 125 | .env 126 | .venv 127 | env/ 128 | venv/ 129 | ENV/ 130 | env.bak/ 131 | venv.bak/ 132 | 133 | # Spyder project settings 134 | .spyderproject 135 | .spyproject 136 | 137 | # Rope project settings 138 | .ropeproject 139 | 140 | # mkdocs documentation 141 | /site 142 | 143 | # mypy 144 | .mypy_cache/ 145 | .dmypy.json 146 | dmypy.json 147 | 148 | # Pyre type checker 149 | .pyre/ 150 | 151 | # pytype static type analyzer 152 | .pytype/ 153 | 154 | # Cython debug symbols 155 | cython_debug/ 156 | 157 | # PyCharm 158 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 159 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 160 | # and can be added to the global gitignore or merged into this file. For a more nuclear 161 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 162 | #.idea/ 163 | -------------------------------------------------------------------------------- /list/.python-version: -------------------------------------------------------------------------------- 1 | 3.11.4 2 | -------------------------------------------------------------------------------- /list/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "autocfg" 7 | version = "1.1.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 10 | 11 | [[package]] 12 | name = "bitflags" 13 | version = "1.3.2" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 16 | 17 | [[package]] 18 | name = "cfg-if" 19 | version = "1.0.0" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 22 | 23 | [[package]] 24 | name = "crossbeam-channel" 25 | version = "0.5.8" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" 28 | dependencies = [ 29 | "cfg-if", 30 | "crossbeam-utils", 31 | ] 32 | 33 | [[package]] 34 | name = "crossbeam-deque" 35 | version = "0.8.3" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" 38 | dependencies = [ 39 | "cfg-if", 40 | "crossbeam-epoch", 41 | "crossbeam-utils", 42 | ] 43 | 44 | [[package]] 45 | name = "crossbeam-epoch" 46 | version = "0.9.15" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" 49 | dependencies = [ 50 | "autocfg", 51 | "cfg-if", 52 | "crossbeam-utils", 53 | "memoffset", 54 | "scopeguard", 55 | ] 56 | 57 | [[package]] 58 | name = "crossbeam-utils" 59 | version = "0.8.16" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 62 | dependencies = [ 63 | "cfg-if", 64 | ] 65 | 66 | [[package]] 67 | name = "either" 68 | version = "1.9.0" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 71 | 72 | [[package]] 73 | name = "hermit-abi" 74 | version = "0.3.2" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 77 | 78 | [[package]] 79 | name = "indoc" 80 | version = "1.0.9" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" 83 | 84 | [[package]] 85 | name = "libc" 86 | version = "0.2.147" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 89 | 90 | [[package]] 91 | name = "lock_api" 92 | version = "0.4.10" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" 95 | dependencies = [ 96 | "autocfg", 97 | "scopeguard", 98 | ] 99 | 100 | [[package]] 101 | name = "memoffset" 102 | version = "0.9.0" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 105 | dependencies = [ 106 | "autocfg", 107 | ] 108 | 109 | [[package]] 110 | name = "num_cpus" 111 | version = "1.16.0" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 114 | dependencies = [ 115 | "hermit-abi", 116 | "libc", 117 | ] 118 | 119 | [[package]] 120 | name = "once_cell" 121 | version = "1.18.0" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 124 | 125 | [[package]] 126 | name = "parking_lot" 127 | version = "0.12.1" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 130 | dependencies = [ 131 | "lock_api", 132 | "parking_lot_core", 133 | ] 134 | 135 | [[package]] 136 | name = "parking_lot_core" 137 | version = "0.9.8" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" 140 | dependencies = [ 141 | "cfg-if", 142 | "libc", 143 | "redox_syscall", 144 | "smallvec", 145 | "windows-targets", 146 | ] 147 | 148 | [[package]] 149 | name = "proc-macro2" 150 | version = "1.0.66" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" 153 | dependencies = [ 154 | "unicode-ident", 155 | ] 156 | 157 | [[package]] 158 | name = "pyo3" 159 | version = "0.19.2" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" 162 | dependencies = [ 163 | "cfg-if", 164 | "indoc", 165 | "libc", 166 | "memoffset", 167 | "parking_lot", 168 | "pyo3-build-config", 169 | "pyo3-ffi", 170 | "pyo3-macros", 171 | "unindent", 172 | ] 173 | 174 | [[package]] 175 | name = "pyo3-build-config" 176 | version = "0.19.2" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5" 179 | dependencies = [ 180 | "once_cell", 181 | "target-lexicon", 182 | ] 183 | 184 | [[package]] 185 | name = "pyo3-ffi" 186 | version = "0.19.2" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9" 189 | dependencies = [ 190 | "libc", 191 | "pyo3-build-config", 192 | ] 193 | 194 | [[package]] 195 | name = "pyo3-macros" 196 | version = "0.19.2" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1" 199 | dependencies = [ 200 | "proc-macro2", 201 | "pyo3-macros-backend", 202 | "quote", 203 | "syn", 204 | ] 205 | 206 | [[package]] 207 | name = "pyo3-macros-backend" 208 | version = "0.19.2" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536" 211 | dependencies = [ 212 | "proc-macro2", 213 | "quote", 214 | "syn", 215 | ] 216 | 217 | [[package]] 218 | name = "quote" 219 | version = "1.0.32" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" 222 | dependencies = [ 223 | "proc-macro2", 224 | ] 225 | 226 | [[package]] 227 | name = "rayon" 228 | version = "1.7.0" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" 231 | dependencies = [ 232 | "either", 233 | "rayon-core", 234 | ] 235 | 236 | [[package]] 237 | name = "rayon-core" 238 | version = "1.11.0" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" 241 | dependencies = [ 242 | "crossbeam-channel", 243 | "crossbeam-deque", 244 | "crossbeam-utils", 245 | "num_cpus", 246 | ] 247 | 248 | [[package]] 249 | name = "redox_syscall" 250 | version = "0.3.5" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 253 | dependencies = [ 254 | "bitflags", 255 | ] 256 | 257 | [[package]] 258 | name = "rust_python_list" 259 | version = "0.1.0" 260 | dependencies = [ 261 | "pyo3", 262 | "rayon", 263 | ] 264 | 265 | [[package]] 266 | name = "scopeguard" 267 | version = "1.2.0" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 270 | 271 | [[package]] 272 | name = "smallvec" 273 | version = "1.11.0" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" 276 | 277 | [[package]] 278 | name = "syn" 279 | version = "1.0.109" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 282 | dependencies = [ 283 | "proc-macro2", 284 | "quote", 285 | "unicode-ident", 286 | ] 287 | 288 | [[package]] 289 | name = "target-lexicon" 290 | version = "0.12.11" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" 293 | 294 | [[package]] 295 | name = "unicode-ident" 296 | version = "1.0.11" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" 299 | 300 | [[package]] 301 | name = "unindent" 302 | version = "0.1.11" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" 305 | 306 | [[package]] 307 | name = "windows-targets" 308 | version = "0.48.1" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" 311 | dependencies = [ 312 | "windows_aarch64_gnullvm", 313 | "windows_aarch64_msvc", 314 | "windows_i686_gnu", 315 | "windows_i686_msvc", 316 | "windows_x86_64_gnu", 317 | "windows_x86_64_gnullvm", 318 | "windows_x86_64_msvc", 319 | ] 320 | 321 | [[package]] 322 | name = "windows_aarch64_gnullvm" 323 | version = "0.48.0" 324 | source = "registry+https://github.com/rust-lang/crates.io-index" 325 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 326 | 327 | [[package]] 328 | name = "windows_aarch64_msvc" 329 | version = "0.48.0" 330 | source = "registry+https://github.com/rust-lang/crates.io-index" 331 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 332 | 333 | [[package]] 334 | name = "windows_i686_gnu" 335 | version = "0.48.0" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 338 | 339 | [[package]] 340 | name = "windows_i686_msvc" 341 | version = "0.48.0" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 344 | 345 | [[package]] 346 | name = "windows_x86_64_gnu" 347 | version = "0.48.0" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 350 | 351 | [[package]] 352 | name = "windows_x86_64_gnullvm" 353 | version = "0.48.0" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 356 | 357 | [[package]] 358 | name = "windows_x86_64_msvc" 359 | version = "0.48.0" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 362 | -------------------------------------------------------------------------------- /list/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_python_list" 3 | version = "0.1.0" 4 | authors = ["Federico Simonetta "] 5 | edition = "2021" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [lib] 10 | name = "list_rust" 11 | path = "src/list_rust.rs" 12 | # "cdylib" is necessary to produce a shared library for Python to import from. 13 | # 14 | # Downstream Rust code (including code in `bin/`, `examples/`, and `tests/`) will not be able 15 | # to `use cython_test;` unless the "rlib" or "lib" crate type is also included, e.g.: 16 | # crate-type = ["cdylib", "rlib"] 17 | crate-type = ["cdylib"] 18 | 19 | [dependencies] 20 | rayon = "1.7.0" 21 | 22 | [dependencies.pyo3] 23 | version = "0.19.2" 24 | features = ["extension-module"] 25 | -------------------------------------------------------------------------------- /list/Manifest.toml: -------------------------------------------------------------------------------- 1 | # This file is machine-generated - editing it directly is not advised 2 | 3 | [[ArgTools]] 4 | uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" 5 | version = "1.1.1" 6 | 7 | [[Artifacts]] 8 | uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" 9 | 10 | [[Base64]] 11 | uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" 12 | 13 | [[CompilerSupportLibraries_jll]] 14 | deps = ["Artifacts", "Libdl"] 15 | uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" 16 | version = "1.0.5+0" 17 | 18 | [[Conda]] 19 | deps = ["Downloads", "JSON", "VersionParsing"] 20 | git-tree-sha1 = "8c86e48c0db1564a1d49548d3515ced5d604c408" 21 | uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" 22 | version = "1.9.1" 23 | 24 | [[Dates]] 25 | deps = ["Printf"] 26 | uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" 27 | 28 | [[Downloads]] 29 | deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] 30 | uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" 31 | version = "1.6.0" 32 | 33 | [[FileWatching]] 34 | uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" 35 | 36 | [[InteractiveUtils]] 37 | deps = ["Markdown"] 38 | uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" 39 | 40 | [[JSON]] 41 | deps = ["Dates", "Mmap", "Parsers", "Unicode"] 42 | git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" 43 | uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" 44 | version = "0.21.4" 45 | 46 | [[LazyArtifacts]] 47 | deps = ["Artifacts", "Pkg"] 48 | uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" 49 | 50 | [[LibCURL]] 51 | deps = ["LibCURL_jll", "MozillaCACerts_jll"] 52 | uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" 53 | version = "0.6.3" 54 | 55 | [[LibCURL_jll]] 56 | deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] 57 | uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" 58 | version = "7.84.0+0" 59 | 60 | [[LibGit2]] 61 | deps = ["Base64", "NetworkOptions", "Printf", "SHA"] 62 | uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" 63 | 64 | [[LibSSH2_jll]] 65 | deps = ["Artifacts", "Libdl", "MbedTLS_jll"] 66 | uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" 67 | version = "1.10.2+0" 68 | 69 | [[Libdl]] 70 | uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" 71 | 72 | [[LinearAlgebra]] 73 | deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] 74 | uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 75 | 76 | [[Logging]] 77 | uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" 78 | 79 | [[MacroTools]] 80 | deps = ["Markdown", "Random"] 81 | git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" 82 | uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" 83 | version = "0.5.10" 84 | 85 | [[Markdown]] 86 | deps = ["Base64"] 87 | uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" 88 | 89 | [[MbedTLS_jll]] 90 | deps = ["Artifacts", "Libdl"] 91 | uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" 92 | version = "2.28.2+0" 93 | 94 | [[Mmap]] 95 | uuid = "a63ad114-7e13-5084-954f-fe012c677804" 96 | 97 | [[MozillaCACerts_jll]] 98 | uuid = "14a3606d-f60d-562e-9121-12d972cd8159" 99 | version = "2022.10.11" 100 | 101 | [[NetworkOptions]] 102 | uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" 103 | version = "1.2.0" 104 | 105 | [[OpenBLAS_jll]] 106 | deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] 107 | uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" 108 | version = "0.3.21+4" 109 | 110 | [[PackageCompiler]] 111 | deps = ["Artifacts", "LazyArtifacts", "Libdl", "Pkg", "Printf", "RelocatableFolders", "TOML", "UUIDs"] 112 | git-tree-sha1 = "1a6a868eb755e8ea9ecd000aa6ad175def0cc85b" 113 | uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" 114 | version = "2.1.7" 115 | 116 | [[Parsers]] 117 | deps = ["Dates", "PrecompileTools", "UUIDs"] 118 | git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" 119 | uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" 120 | version = "2.7.2" 121 | 122 | [[Pkg]] 123 | deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] 124 | uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" 125 | version = "1.9.2" 126 | 127 | [[PrecompileTools]] 128 | deps = ["Preferences"] 129 | git-tree-sha1 = "9673d39decc5feece56ef3940e5dafba15ba0f81" 130 | uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" 131 | version = "1.1.2" 132 | 133 | [[Preferences]] 134 | deps = ["TOML"] 135 | git-tree-sha1 = "7eb1686b4f04b82f96ed7a4ea5890a4f0c7a09f1" 136 | uuid = "21216c6a-2e73-6563-6e65-726566657250" 137 | version = "1.4.0" 138 | 139 | [[Printf]] 140 | deps = ["Unicode"] 141 | uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" 142 | 143 | [[PyCall]] 144 | deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Serialization", "VersionParsing"] 145 | git-tree-sha1 = "43d304ac6f0354755f1d60730ece8c499980f7ba" 146 | uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" 147 | version = "1.96.1" 148 | 149 | [[REPL]] 150 | deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] 151 | uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" 152 | 153 | [[Random]] 154 | deps = ["SHA", "Serialization"] 155 | uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 156 | 157 | [[RelocatableFolders]] 158 | deps = ["SHA", "Scratch"] 159 | git-tree-sha1 = "90bc7a7c96410424509e4263e277e43250c05691" 160 | uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" 161 | version = "1.0.0" 162 | 163 | [[SHA]] 164 | uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" 165 | version = "0.7.0" 166 | 167 | [[Scratch]] 168 | deps = ["Dates"] 169 | git-tree-sha1 = "30449ee12237627992a99d5e30ae63e4d78cd24a" 170 | uuid = "6c6a2e73-6563-6170-7368-637461726353" 171 | version = "1.2.0" 172 | 173 | [[Serialization]] 174 | uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" 175 | 176 | [[Sockets]] 177 | uuid = "6462fe0b-24de-5631-8697-dd941f90decc" 178 | 179 | [[TOML]] 180 | deps = ["Dates"] 181 | uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" 182 | version = "1.0.3" 183 | 184 | [[Tar]] 185 | deps = ["ArgTools", "SHA"] 186 | uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" 187 | version = "1.10.0" 188 | 189 | [[ThreadedIterables]] 190 | git-tree-sha1 = "f5c6ac9a5f20cbd5ad2762f8372bfe980139c483" 191 | uuid = "11d239b0-c0b9-11e8-1935-d5cfa53abb03" 192 | version = "0.2.1" 193 | 194 | [[UUIDs]] 195 | deps = ["Random", "SHA"] 196 | uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" 197 | 198 | [[Unicode]] 199 | uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" 200 | 201 | [[VersionParsing]] 202 | git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" 203 | uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" 204 | version = "1.3.0" 205 | 206 | [[Zlib_jll]] 207 | deps = ["Libdl"] 208 | uuid = "83775a58-1f1d-513f-b197-d71354ab007a" 209 | version = "1.2.13+0" 210 | 211 | [[libblastrampoline_jll]] 212 | deps = ["Artifacts", "Libdl"] 213 | uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" 214 | version = "5.8.0+0" 215 | 216 | [[nghttp2_jll]] 217 | deps = ["Artifacts", "Libdl"] 218 | uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" 219 | version = "1.48.0+0" 220 | 221 | [[p7zip_jll]] 222 | deps = ["Artifacts", "Libdl"] 223 | uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" 224 | version = "17.4.0+0" 225 | -------------------------------------------------------------------------------- /list/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" 3 | PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" 4 | ThreadedIterables = "11d239b0-c0b9-11e8-1935-d5cfa53abb03" 5 | -------------------------------------------------------------------------------- /list/README.md: -------------------------------------------------------------------------------- 1 | # example-package 2 | -------------------------------------------------------------------------------- /list/README.rst: -------------------------------------------------------------------------------- 1 | Python Complementary Languages 2 | ============================== 3 | 4 | This repository contains a small benchmark to see which language is better to speedup computations when Python lists of lists are used 5 | 6 | Algorithm 7 | --------- 8 | 1. Create a list of 10^4 lists each with a number of floats defined by the the argument; the float 9 | value is arbitrary (e.g. 0.1) 10 | 2. Iterate each list and compute the cumulative product - 2 nested for 11 | 12 | Algorithms using arrays instead of lists/vectors are not valid. 13 | 14 | The aim of the algorithm is to prove ability in data sharing from Python to the 15 | complementary language and back, including counting precision with little numbers. 16 | 17 | Implementations 18 | --------------- 19 | 20 | * Julia using Julia objects 21 | * Rust using Rust objects 22 | * Pure-python 23 | * Numba 24 | * Cython pure-python mode with no annotations 25 | * Cython pure-python mode with Python annotations 26 | * Cython pure-python mode with Cython annotations 27 | * Standard Cython 28 | * Nim lang 29 | 30 | Setup 31 | ----- 32 | * Install pyenv: ``curl https://pyenv.run | bash; exec $SHELL`` 33 | * Install python 3.11.4: ``PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.11.4`` 34 | * Install pdm: ``curl -sSL https://pdm.fming.dev/install-pdm.py | python3 - `` 35 | * Install Cargo, Nim, C/C++ compiler 36 | * Install project dependencies: ``pdm install -v`` (create virtualenv, install 37 | pakages, and compile). **When prompted for recompiling PyCall, choose option 2. 38 | (recompile) and optionally restart the installtion if it fails** 39 | 40 | N.B. ``PYTHON_CONFIGURE_OPTS="--enable-shared"`` is needed for pyjulia to work. 41 | 42 | Results 43 | ------- 44 | 45 | * `` 46 | * ``pdm run python main.py`` 47 | `` 48 | 49 | 50 | Tested on: 51 | 52 | * CPU: 14-core 12th Gen Intel Core i9-12900H (-MST AMCP-) 53 | speed/min/max: 2413/400/4900:5000:3800 MHz 54 | * Linux 6.1.41 55 | * GCC 13.1.1 56 | * Python 3.11.4 57 | Cython 3.0.0 58 | * Julia 1.9.2 59 | * Cargo 1.71.0 60 | * Nim 1.6.10 61 | 62 | 63 | **Pure python time (reference): 11.03 s** 64 | 65 | Compiled-based languages 66 | ~~~~~~~~~~~~~~~~~~~~~~~~ 67 | 68 | +-------------------------------+----------------+---------------------------+---------------------------+ 69 | | | No annotations | Annotations from `typing` | Annotations from `cython` | 70 | +-------------------------------+----------------+---------------------------+---------------------------+ 71 | | C++ Cython (pure-python mode) | 02.42 | 02.98 | 02.92 | 72 | +-------------------------------+----------------+---------------------------+---------------------------+ 73 | | C Cython (pure-python mode) | 02.40 | 02.97 | 02.87 | 74 | +-------------------------------+----------------+---------------------------+---------------------------+ 75 | | C Cython (.pyx) | - | - | 00.81 | 76 | +-------------------------------+----------------+---------------------------+---------------------------+ 77 | | Rust (PyO3) parallel 1st run | 07.40 | - | - | 78 | +-------------------------------+----------------+---------------------------+---------------------------+ 79 | | Rust (PyO3) parallel 2nd run | 09.45 | - | - | 80 | +-------------------------------+----------------+---------------------------+---------------------------+ 81 | | Nim | 05.59 | - | - | 82 | +-------------------------------+----------------+---------------------------+---------------------------+ 83 | 84 | JIT-based languages 85 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 | 87 | +-------------------------------+----------------+-----------+ 88 | | | Second run | First Run | 89 | +-------------------------------+----------------+-----------+ 90 | | Julia (pyjulia) | 00.83 | 02.46 | 91 | +-------------------------------+----------------+-----------+ 92 | | Julia (pyjulia) parallel | 00.52 | 01.12 | 93 | +-------------------------------+----------------+-----------+ 94 | | Numba | 04.88 | 05.58 | 95 | +-------------------------------+----------------+-----------+ 96 | | Numba parallel | 02.75 | 03.30 | 97 | +-------------------------------+----------------+-----------+ 98 | 99 | Cython is fast, but none of these methods are able to release the GIL. Moreover, 100 | in pure-python mode, Cython effectiveness decreases while using typing 101 | annotations. Last but not least, it's hard to understand which solution is 102 | better with Cython. The average time is 2.48 s. 103 | 104 | Rust is not that fast beacuse it needs to copy data; using Pyo3 objects would 105 | probably lead to similar results as cython, but with an added library. 106 | Moreover, it's tricky because after having run some code its perfomance 107 | decreases. 108 | 109 | Similarly to Rust, Nim suffers from copying data too. 110 | 111 | Numba is still tricky with lists. Performance is encouraging, but the code is 112 | not intuitive at all and requires a lot of hacks, breaking the pythonic 113 | language. 114 | 115 | Julia is fast as much as Cython and with multithreading it's even faster! 116 | Considering echosystem, multithreading and ease of use, Julia is a clear winner 117 | here. 118 | -------------------------------------------------------------------------------- /list/_julia_project.py: -------------------------------------------------------------------------------- 1 | import os 2 | from julia_project import JuliaProject 3 | 4 | mymodule_path = os.path.dirname(os.path.abspath(__file__)) 5 | 6 | # This just creates an object, but does none of the steps above. 7 | myjuliaproject = JuliaProject( 8 | name="list_julia", 9 | package_path=mymodule_path, 10 | version_spec="^1.9.2", 11 | calljulia="pyjulia", 12 | sys_image_dir="./sys_image", 13 | sys_image_file_base="list_julia" 14 | ) 15 | -------------------------------------------------------------------------------- /list/list_cy.pyx: -------------------------------------------------------------------------------- 1 | # cython: language_level=3 2 | # from cython.parallel import prange 3 | 4 | 5 | cpdef float iterate_list(list a_list): 6 | cdef double count = 0, d 7 | cdef int i 8 | cdef list internal_list 9 | for internal_list in a_list: 10 | for d in internal_list: 11 | count += d 12 | print(count) 13 | return count 14 | 15 | 16 | cpdef list make_list(a_list): 17 | cdef int i, j 18 | return [[0.01]*(10**4) for _ in range(10**4)] 19 | -------------------------------------------------------------------------------- /list/list_cy_annotations.py: -------------------------------------------------------------------------------- 1 | # distutils: language=c++ 2 | 3 | import cython 4 | 5 | 6 | @cython.locals(i=cython.int, j=cython.int, count=cython.double, a_list=list) 7 | def iterate_list(a_list: list) -> cython.float: 8 | 9 | count = 0.0 10 | for i in range(len(a_list)): 11 | for j in range(len(a_list[i])): 12 | count = count + a_list[i][j] 13 | print(count) 14 | return count 15 | 16 | 17 | @cython.locals(i=cython.int, j=cython.int, new_list=list, a_list=list) 18 | def make_list(a_list: list) -> list: 19 | for i in range(10**4): 20 | new_list = [] 21 | for j in range(10**4): 22 | new_list.append(0.01) 23 | a_list.append(new_list) 24 | return a_list 25 | -------------------------------------------------------------------------------- /list/list_cy_annotations_c.py: -------------------------------------------------------------------------------- 1 | # distutils: language=c 2 | 3 | import cython 4 | 5 | 6 | @cython.locals(i=cython.int, j=cython.int, count=cython.double, a_list=list) 7 | def iterate_list(a_list: list) -> float: 8 | 9 | count = 0.0 10 | for i in range(len(a_list)): 11 | for j in range(len(a_list[i])): 12 | count = count + a_list[i][j] 13 | print(count) 14 | return count 15 | 16 | 17 | @cython.locals(i=cython.int, j=cython.int, new_list=list, a_list=list) 18 | def make_list(a_list: list) -> list: 19 | for i in range(10**4): 20 | new_list = [] 21 | for j in range(10**4): 22 | new_list.append(0.01) 23 | a_list.append(new_list) 24 | return a_list 25 | -------------------------------------------------------------------------------- /list/list_julia.jl: -------------------------------------------------------------------------------- 1 | using PyCall 2 | 3 | function iterate_list(a_list::Vector{Vector{Float64}}) 4 | 5 | count = 0.0 6 | @inbounds for i in 1:length(a_list) 7 | internal_list = a_list[i] 8 | @simd for j in 1:length(internal_list) 9 | count += internal_list[j] 10 | end 11 | end 12 | println(count) 13 | return count 14 | end 15 | 16 | 17 | function make_list(a_list::Vector{Any}) 18 | convert(Vector{Vector{Float64}}, a_list) 19 | @inbounds for i in 1:10^4 20 | new_list = zeros(10^4) 21 | @simd for j in 1:10^4 22 | new_list[j] = 0.01 23 | end 24 | push!(a_list, new_list) 25 | end 26 | return a_list 27 | end 28 | -------------------------------------------------------------------------------- /list/list_julia_threads.jl: -------------------------------------------------------------------------------- 1 | module Threaded 2 | 3 | using ThreadedIterables: tmapreduce 4 | 5 | 6 | function iterate_list(a_list) 7 | count::Float64 = tmapreduce(x -> reduce(+, x), +, a_list) 8 | println(count) 9 | return count 10 | end 11 | 12 | 13 | end # module 14 | -------------------------------------------------------------------------------- /list/list_nim.nim: -------------------------------------------------------------------------------- 1 | import nimpy # https://github.com/yglukhov/nimpy 2 | 3 | const length = 10_000 # 10^4 (10**4 in Python), DRY, specified in README doc. 4 | 5 | proc iterate_list(a_list: openArray[seq[float]]): float {.exportpy.} = 6 | for i in 0 ..< a_list.len: 7 | for j in 0 ..< a_list[i].len: 8 | result += a_list[i][j] 9 | stdout.write result 10 | 11 | func make_list(a_list: openArray[seq[float]]): seq[seq[float]] {.exportpy, noinit.} = 12 | result = newSeq[seq[float]](length) 13 | for i in 0 ..< length: 14 | var new_list = newSeqUninitialized[float](length) 15 | for j in 0 ..< length: 16 | new_list[j] = 0.01 17 | result[i] = new_list 18 | -------------------------------------------------------------------------------- /list/list_nim.nim.cfg: -------------------------------------------------------------------------------- 1 | -d:lto 2 | -d:danger 3 | -d:noSignalHandler 4 | 5 | --gc:arc 6 | --app:lib 7 | --passL:"-fsingle-precision-constant -march=native -ffast-math" 8 | -------------------------------------------------------------------------------- /list/list_numba.py: -------------------------------------------------------------------------------- 1 | from numba import njit, prange, typed 2 | 3 | 4 | @njit 5 | def iterate_list(a_list): 6 | count: float = 0 7 | for i in range(len(a_list)): 8 | for j in range(len(a_list[i])): 9 | count += a_list[i][j] 10 | print(count) 11 | return count 12 | 13 | 14 | @njit(parallel=False) 15 | def iterate_list_par(a_list): 16 | count: float = 0 17 | for i in range(len(a_list)): 18 | for j in range(len(a_list[i])): 19 | count += a_list[i][j] 20 | print(count) 21 | return count 22 | 23 | 24 | @njit(parallel=True) 25 | def iterate_list_par_parallel(a_list): 26 | count: float = 0 27 | for i in prange(len(a_list)): 28 | for j in range(len(a_list[i])): 29 | count += a_list[i][j] 30 | print(count) 31 | return count 32 | 33 | 34 | @njit 35 | def make_list(a_list): 36 | for i in range(10 ** 4): 37 | new_list = typed.List() 38 | for j in range(10 ** 4): 39 | new_list.append(0.01) 40 | a_list.append(new_list) 41 | return a_list 42 | 43 | 44 | def make_empty_numba_list(): 45 | _nb_a_list = typed.List() 46 | 47 | # add variable, to tell numba the type, then remove it for the benchmark 48 | dummy = typed.List([0.01]) 49 | _nb_a_list.append(dummy) 50 | _nb_a_list.pop(0) 51 | 52 | return _nb_a_list 53 | -------------------------------------------------------------------------------- /list/list_py.py: -------------------------------------------------------------------------------- 1 | # distutils: language=c++ 2 | 3 | 4 | def iterate_list(a_list): 5 | 6 | count = 0 7 | for i in range(len(a_list)): 8 | for j in range(len(a_list[i])): 9 | count += a_list[i][j] 10 | print(count) 11 | return count 12 | 13 | 14 | def make_list(a_list): 15 | for i in range(10**4): 16 | new_list = [] 17 | for j in range(10**4): 18 | new_list.append(0.01) 19 | a_list.append(new_list) 20 | return a_list 21 | -------------------------------------------------------------------------------- /list/list_py_annotations.py: -------------------------------------------------------------------------------- 1 | # distutils: language = c++ 2 | from typing import List 3 | 4 | 5 | def iterate_list(a_list: List[List[float]]) -> float: 6 | 7 | count: float = 0 8 | for i in range(len(a_list)): 9 | for j in range(len(a_list[i])): 10 | count += a_list[i][j] 11 | print(count) 12 | return count 13 | 14 | 15 | def make_list(a_list: List[List[float]]) -> List[List[float]]: 16 | for i in range(10**4): 17 | new_list = [] 18 | for j in range(10**4): 19 | new_list.append(0.01) 20 | a_list.append(new_list) 21 | return a_list 22 | -------------------------------------------------------------------------------- /list/list_py_annotations_c.py: -------------------------------------------------------------------------------- 1 | # distutils: language = c 2 | from typing import List 3 | 4 | 5 | def iterate_list(a_list: List[List[float]]) -> float: 6 | 7 | count: float = 0 8 | for i in range(len(a_list)): 9 | for j in range(len(a_list[i])): 10 | count += a_list[i][j] 11 | print(count) 12 | return count 13 | 14 | 15 | def make_list(a_list: List[List[float]]) -> List[List[float]]: 16 | for i in range(10**4): 17 | new_list = [] 18 | for j in range(10**4): 19 | new_list.append(0.01) 20 | a_list.append(new_list) 21 | return a_list 22 | -------------------------------------------------------------------------------- /list/list_py_c.py: -------------------------------------------------------------------------------- 1 | # distutils: language=c 2 | 3 | 4 | def iterate_list(a_list): 5 | 6 | count = 0 7 | for i in range(len(a_list)): 8 | for j in range(len(a_list[i])): 9 | count += a_list[i][j] 10 | print(count) 11 | return count 12 | 13 | 14 | def make_list(a_list): 15 | for i in range(10**4): 16 | new_list = [] 17 | for j in range(10**4): 18 | new_list.append(0.01) 19 | a_list.append(new_list) 20 | return a_list 21 | -------------------------------------------------------------------------------- /list/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | from typing import List 4 | from numba import typed, types, float64 5 | 6 | from _julia_project import myjuliaproject 7 | 8 | list_julia = myjuliaproject.julia.Main 9 | 10 | import list_cy_annotations 11 | import list_cy_annotations_c 12 | import list_py 13 | import list_py_annotations 14 | import list_py_annotations_c 15 | import list_py_c 16 | import simple_list 17 | import list_cy 18 | import list_rust 19 | import list_nim 20 | import list_numba 21 | 22 | list_julia.eval('include("list_julia.jl")') 23 | list_julia.eval('include("list_julia_threads.jl")') 24 | 25 | _a_list: List[List[float]] 26 | 27 | _nb_a_list = list_numba.make_empty_numba_list() 28 | ttt = time.time() 29 | _nb_a_list = list_numba.make_list(_nb_a_list) 30 | list_numba.iterate_list_par(_nb_a_list) 31 | print("Numba needed time: " + str(time.time() - ttt)) 32 | 33 | _nb_a_list = list_numba.make_empty_numba_list() 34 | ttt = time.time() 35 | _nb_a_list = list_numba.make_list(_nb_a_list) 36 | list_numba.iterate_list_par(_nb_a_list) 37 | print("Numba needed time (after compile): " + str(time.time() - ttt)) 38 | 39 | _nb_a_list = list_numba.make_empty_numba_list() 40 | ttt = time.time() 41 | _nb_a_list = list_numba.make_list(_nb_a_list) 42 | list_numba.iterate_list_par_parallel(_nb_a_list) 43 | print("Numba multi-threading needed time: " + str(time.time() - ttt)) 44 | 45 | _nb_a_list = list_numba.make_empty_numba_list() 46 | ttt = time.time() 47 | _nb_a_list = list_numba.make_list(_nb_a_list) 48 | list_numba.iterate_list_par_parallel(_nb_a_list) 49 | print("Numba multi-threading needed time (after compile): " + str(time.time() - ttt)) 50 | 51 | a_list = [] # type: ignore 52 | ttt = time.time() 53 | a_list = list_rust.make_list(a_list) 54 | list_rust.iterate_list(a_list) 55 | print("Rust multithreading before needed time: " + str(time.time() - ttt)) 56 | 57 | a_list = [] # type: ignore 58 | ttt = time.time() 59 | a_list = list_julia.make_list(a_list) 60 | list_julia.iterate_list(a_list) 61 | print("Julia needed time: " + str(time.time() - ttt)) 62 | 63 | a_list = [] # type: ignore 64 | ttt = time.time() 65 | a_list = list_julia.make_list(a_list) 66 | list_julia.iterate_list(a_list) 67 | print("Julia needed time (after warm up): " + str(time.time() - ttt)) 68 | 69 | a_list = [] # type: ignore 70 | ttt = time.time() 71 | a_list = list_julia.make_list(a_list) 72 | list_julia.Threaded.iterate_list(a_list) 73 | print("Julia multi-threading needed time: " + str(time.time() - ttt)) 74 | 75 | a_list = [] # type: ignore 76 | ttt = time.time() 77 | a_list = list_julia.make_list(a_list) 78 | list_julia.Threaded.iterate_list(a_list) 79 | print("Julia multi-threading needed time (after warm up): " + str(time.time() - ttt)) 80 | 81 | a_list = [] # type: ignore 82 | ttt = time.time() 83 | a_list = list_rust.make_list(a_list) 84 | list_rust.iterate_list(a_list) 85 | print("Rust multithreading after needed time: " + str(time.time() - ttt)) 86 | 87 | a_list = [] # type: ignore 88 | ttt = time.time() 89 | a_list = simple_list.make_list(a_list) 90 | simple_list.iterate_list(a_list) 91 | print("Python needed time: " + str(time.time() - ttt)) 92 | 93 | a_list = [] # type: ignore 94 | ttt = time.time() 95 | a_list = list_py.make_list(a_list) 96 | list_py.iterate_list(a_list) 97 | print("C++ Cython-pure no annotations needed time: " + str(time.time() - ttt)) 98 | 99 | a_list = [] # type: ignore 100 | ttt = time.time() 101 | a_list = list_py_c.make_list(a_list) 102 | list_py_c.iterate_list(a_list) 103 | print("C Cython-pure no annotations needed time: " + str(time.time() - ttt)) 104 | 105 | _a_list = [] 106 | ttt = time.time() 107 | _a_list = list_py_annotations.make_list(_a_list) 108 | list_py_annotations.iterate_list(_a_list) 109 | print("C++ Cython-pure pure-annotations needed time: " + 110 | str(time.time() - ttt)) 111 | 112 | _a_list = [] 113 | ttt = time.time() 114 | _a_list = list_py_annotations_c.make_list(_a_list) 115 | list_py_annotations_c.iterate_list(_a_list) 116 | print("C Cython-pure pure-annotations needed time: " + str(time.time() - ttt)) 117 | 118 | _a_list = [] 119 | ttt = time.time() 120 | _a_list = list_cy.make_list(_a_list) 121 | list_cy.iterate_list(_a_list) 122 | print("C Cython needed time: " + str(time.time() - ttt)) 123 | 124 | _a_list = [] 125 | ttt = time.time() 126 | _a_list = list_cy_annotations.make_list(_a_list) 127 | list_cy_annotations.iterate_list(_a_list) 128 | print("C++ Cython-pure needed time: " + str(time.time() - ttt)) 129 | 130 | _a_list = [] 131 | ttt = time.time() 132 | _a_list = list_cy_annotations_c.make_list(_a_list) 133 | list_cy_annotations_c.iterate_list(_a_list) 134 | print("C Cython-pure needed time: " + str(time.time() - ttt)) 135 | 136 | _a_list = [] 137 | ttt = time.time() 138 | _a_list = list_nim.make_list(_a_list) 139 | list_nim.iterate_list(_a_list) 140 | print("Nim needed time: " + str(time.time() - ttt)) 141 | -------------------------------------------------------------------------------- /list/pdm.lock: -------------------------------------------------------------------------------- 1 | # This file is @generated by PDM. 2 | # It is not intended for manual editing. 3 | 4 | [metadata] 5 | groups = ["default"] 6 | cross_platform = true 7 | static_urls = false 8 | lock_version = "4.3" 9 | content_hash = "sha256:725563c436e974846b616da6257cd091cc0ac627c7c5a4f58595bb4c6611e2bc" 10 | 11 | [[package]] 12 | name = "attrs" 13 | version = "23.1.0" 14 | requires_python = ">=3.7" 15 | summary = "Classes Without Boilerplate" 16 | files = [ 17 | {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, 18 | {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, 19 | ] 20 | 21 | [[package]] 22 | name = "certifi" 23 | version = "2023.7.22" 24 | requires_python = ">=3.6" 25 | summary = "Python package for providing Mozilla's CA Bundle." 26 | files = [ 27 | {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, 28 | {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, 29 | ] 30 | 31 | [[package]] 32 | name = "charset-normalizer" 33 | version = "3.2.0" 34 | requires_python = ">=3.7.0" 35 | summary = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." 36 | files = [ 37 | {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"}, 38 | {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"}, 39 | {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"}, 40 | {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"}, 41 | {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"}, 42 | {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"}, 43 | {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"}, 44 | {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"}, 45 | {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"}, 46 | {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"}, 47 | {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"}, 48 | {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"}, 49 | {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"}, 50 | {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"}, 51 | {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"}, 52 | {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"}, 53 | {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"}, 54 | ] 55 | 56 | [[package]] 57 | name = "cython" 58 | version = "3.0.0" 59 | requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 60 | summary = "The Cython compiler for writing C extensions in the Python language." 61 | files = [ 62 | {file = "Cython-3.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:06db81b1a01858fcc406616f8528e686ffb6cf7c3d78fb83767832bfecea8ad8"}, 63 | {file = "Cython-3.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c93634845238645ce7abf63a56b1c5b6248189005c7caff898fd4a0dac1c5e1e"}, 64 | {file = "Cython-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa606675c6bd23478b1d174e2a84e3c5a2c660968f97dc455afe0fae198f9d3d"}, 65 | {file = "Cython-3.0.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d3355e6f690184f984eeb108b0f5bbc4bcf8b9444f8168933acf79603abf7baf"}, 66 | {file = "Cython-3.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:93a34e1ca8afa4b7075b02ed14a7e4969256297029fb1bfd4cbe48f7290dbcff"}, 67 | {file = "Cython-3.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bb1165ca9e78823f9ad1efa5b3d83156f868eabd679a615d140a3021bb92cd65"}, 68 | {file = "Cython-3.0.0-cp311-cp311-win32.whl", hash = "sha256:2fadde1da055944f5e1e17625055f54ddd11f451889110278ef30e07bd5e1695"}, 69 | {file = "Cython-3.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:254ed1f03a6c237fa64f0c6e44862058de65bfa2e6a3b48ca3c205492e0653aa"}, 70 | {file = "Cython-3.0.0-py2.py3-none-any.whl", hash = "sha256:ff1aef1a03cfe293237c7a86ae9625b0411b2df30c53d1a7f29a8d381f38a1df"}, 71 | {file = "Cython-3.0.0.tar.gz", hash = "sha256:350b18f9673e63101dbbfcf774ee2f57c20ac4636d255741d76ca79016b1bd82"}, 72 | ] 73 | 74 | [[package]] 75 | name = "find-julia" 76 | version = "0.2.9" 77 | summary = "Find or install Julia" 78 | dependencies = [ 79 | "jill", 80 | "julia-semver", 81 | ] 82 | files = [ 83 | {file = "find_julia-0.2.9-py3-none-any.whl", hash = "sha256:86cfeec952f16ec5a5b47fac50834e4262e06497f500198ae03da18c295e8313"}, 84 | {file = "find_julia-0.2.9.tar.gz", hash = "sha256:f0c9e324441edfe5a5a921cbdcc6666f23a7f0ea6f63fd4bf17fd969af384951"}, 85 | ] 86 | 87 | [[package]] 88 | name = "find-libpython" 89 | version = "0.3.0" 90 | summary = "Finds the libpython associated with your environment, wherever it may be hiding" 91 | files = [ 92 | {file = "find_libpython-0.3.0-py3-none-any.whl", hash = "sha256:93fa14c8d007a7f9e6b650a486e249b49f01fd8d45b83ecf080a78b1a7011214"}, 93 | {file = "find_libpython-0.3.0.tar.gz", hash = "sha256:6e7fe5d9af7fad6dc066cb5515a0e9c90a71f1feb2bb2f8e4cdbb4f83276e9e5"}, 94 | ] 95 | 96 | [[package]] 97 | name = "fire" 98 | version = "0.5.0" 99 | summary = "A library for automatically generating command line interfaces." 100 | dependencies = [ 101 | "six", 102 | "termcolor", 103 | ] 104 | files = [ 105 | {file = "fire-0.5.0.tar.gz", hash = "sha256:a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6"}, 106 | ] 107 | 108 | [[package]] 109 | name = "idna" 110 | version = "3.4" 111 | requires_python = ">=3.5" 112 | summary = "Internationalized Domain Names in Applications (IDNA)" 113 | files = [ 114 | {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, 115 | {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, 116 | ] 117 | 118 | [[package]] 119 | name = "jill" 120 | version = "0.11.3" 121 | requires_python = ">=3.7,<4.0" 122 | summary = "JILL -- Julia Installer for Linux (MacOS, Windows and FreeBSD) -- Light" 123 | dependencies = [ 124 | "fire<0.6.0,>=0.5.0", 125 | "jsonschema<5.0.0,>=4.17.3", 126 | "python-gnupg<0.6.0,>=0.5.0", 127 | "requests-futures<2.0.0,>=1.0.0", 128 | "requests<3.0.0,>=2.28.2", 129 | "semantic-version<3.0.0,>=2.10.0", 130 | "wget<4.0,>=3.2", 131 | ] 132 | files = [ 133 | {file = "jill-0.11.3-py3-none-any.whl", hash = "sha256:a869388f73d40290471624a89e4d55d5817febaa874635181574494e90b3375e"}, 134 | {file = "jill-0.11.3.tar.gz", hash = "sha256:885bb1c26e2ac6563828767eb87409dd69581e5f187110b958f4c7dcbe45b27b"}, 135 | ] 136 | 137 | [[package]] 138 | name = "jsonschema" 139 | version = "4.18.6" 140 | requires_python = ">=3.8" 141 | summary = "An implementation of JSON Schema validation for Python" 142 | dependencies = [ 143 | "attrs>=22.2.0", 144 | "jsonschema-specifications>=2023.03.6", 145 | "referencing>=0.28.4", 146 | "rpds-py>=0.7.1", 147 | ] 148 | files = [ 149 | {file = "jsonschema-4.18.6-py3-none-any.whl", hash = "sha256:dc274409c36175aad949c68e5ead0853aaffbe8e88c830ae66bb3c7a1728ad2d"}, 150 | {file = "jsonschema-4.18.6.tar.gz", hash = "sha256:ce71d2f8c7983ef75a756e568317bf54bc531dc3ad7e66a128eae0d51623d8a3"}, 151 | ] 152 | 153 | [[package]] 154 | name = "jsonschema-specifications" 155 | version = "2023.7.1" 156 | requires_python = ">=3.8" 157 | summary = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" 158 | dependencies = [ 159 | "referencing>=0.28.0", 160 | ] 161 | files = [ 162 | {file = "jsonschema_specifications-2023.7.1-py3-none-any.whl", hash = "sha256:05adf340b659828a004220a9613be00fa3f223f2b82002e273dee62fd50524b1"}, 163 | {file = "jsonschema_specifications-2023.7.1.tar.gz", hash = "sha256:c91a50404e88a1f6ba40636778e2ee08f6e24c5613fe4c53ac24578a5a7f72bb"}, 164 | ] 165 | 166 | [[package]] 167 | name = "julia" 168 | version = "0.6.1" 169 | requires_python = ">=3.4" 170 | summary = "Julia/Python bridge with IPython support." 171 | files = [ 172 | {file = "julia-0.6.1-py2.py3-none-any.whl", hash = "sha256:69b997866dac2900e23563bd954ba634f8829f4f16ab7107ba1e9b4a90381b67"}, 173 | {file = "julia-0.6.1.tar.gz", hash = "sha256:dbada3b47cb14b3e1893dae8339053e014cf09f8158f408b6a129ca4dfca1f61"}, 174 | ] 175 | 176 | [[package]] 177 | name = "julia-project" 178 | version = "0.1.27" 179 | summary = "Manage Julia dependency in a Python module" 180 | dependencies = [ 181 | "find-julia>=0.2.7", 182 | "julia-project-basic>=0.1.5", 183 | "julia>=0.2", 184 | "juliacall>=0.6.1", 185 | ] 186 | files = [ 187 | {file = "julia_project-0.1.27-py3-none-any.whl", hash = "sha256:96f4f08a3937ba0abc994c42c93d203489b2357664c9cf8754f6a917910e7ad0"}, 188 | {file = "julia_project-0.1.27.tar.gz", hash = "sha256:0c86b3ee4835915e1d064de88c6f46c7ae27703ad60f91735ccd78186d307353"}, 189 | ] 190 | 191 | [[package]] 192 | name = "julia-project-basic" 193 | version = "0.1.7" 194 | summary = "Ensure that Julia packages are installed correctly" 195 | dependencies = [ 196 | "find-libpython", 197 | "tomli", 198 | ] 199 | files = [ 200 | {file = "julia_project_basic-0.1.7-py3-none-any.whl", hash = "sha256:f234b069841c23969c592087b6abf52ea604e8122f83619a817ca96c0073bccc"}, 201 | {file = "julia_project_basic-0.1.7.tar.gz", hash = "sha256:8b9a9f23c1568c69a960086177bf68c420fd9df4ffb7ffae36e3f59efd210ee1"}, 202 | ] 203 | 204 | [[package]] 205 | name = "julia-semver" 206 | version = "0.1.3" 207 | summary = "Julia version specifier format implementation" 208 | dependencies = [ 209 | "semantic-version~=2.9", 210 | ] 211 | files = [ 212 | {file = "julia_semver-0.1.3.tar.gz", hash = "sha256:e28fa3a618583cd414774426548f500e009a65152b265784c141ae2b615f965d"}, 213 | ] 214 | 215 | [[package]] 216 | name = "juliacall" 217 | version = "0.9.14" 218 | requires_python = "~=3.7" 219 | summary = "Julia and Python in seamless harmony" 220 | dependencies = [ 221 | "juliapkg~=0.1.8", 222 | ] 223 | files = [ 224 | {file = "juliacall-0.9.14-py3-none-any.whl", hash = "sha256:663339bfca454fe02aa8024f918db4e24007bb4d583cad371ace78baff39c4b3"}, 225 | {file = "juliacall-0.9.14.tar.gz", hash = "sha256:65aa489280ac7e92f4e309cccec1994bdcffbb37f423d1b351f3f52bb35d5514"}, 226 | ] 227 | 228 | [[package]] 229 | name = "juliapkg" 230 | version = "0.1.10" 231 | summary = "Julia version manager and package manager" 232 | dependencies = [ 233 | "semantic-version~=2.9", 234 | ] 235 | files = [ 236 | {file = "juliapkg-0.1.10-py3-none-any.whl", hash = "sha256:716a4e665bd3c9cc9321d45712d60ba624c50d64ec73b04a7f0ee962649c8f1b"}, 237 | {file = "juliapkg-0.1.10.tar.gz", hash = "sha256:70507318d51ac8663e856f56048764e49f5a0c4c90d81a3712d039a316369505"}, 238 | ] 239 | 240 | [[package]] 241 | name = "llvmlite" 242 | version = "0.40.1" 243 | requires_python = ">=3.8" 244 | summary = "lightweight wrapper around basic LLVM functionality" 245 | files = [ 246 | {file = "llvmlite-0.40.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a66a5bd580951751b4268f4c3bddcef92682814d6bc72f3cd3bb67f335dd7097"}, 247 | {file = "llvmlite-0.40.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:467b43836b388eaedc5a106d76761e388dbc4674b2f2237bc477c6895b15a634"}, 248 | {file = "llvmlite-0.40.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c23edd196bd797dc3a7860799054ea3488d2824ecabc03f9135110c2e39fcbc"}, 249 | {file = "llvmlite-0.40.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a36d9f244b6680cb90bbca66b146dabb2972f4180c64415c96f7c8a2d8b60a36"}, 250 | {file = "llvmlite-0.40.1-cp311-cp311-win_amd64.whl", hash = "sha256:5b3076dc4e9c107d16dc15ecb7f2faf94f7736cd2d5e9f4dc06287fd672452c1"}, 251 | {file = "llvmlite-0.40.1.tar.gz", hash = "sha256:5cdb0d45df602099d833d50bd9e81353a5e036242d3c003c5b294fc61d1986b4"}, 252 | ] 253 | 254 | [[package]] 255 | name = "maturin" 256 | version = "1.1.0" 257 | requires_python = ">=3.7" 258 | summary = "Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages" 259 | files = [ 260 | {file = "maturin-1.1.0-py3-none-linux_armv6l.whl", hash = "sha256:eb04f3473b9f283eba51a5dc20dc0bab6f8741048c1bbc5e45f39cc29ad69aa6"}, 261 | {file = "maturin-1.1.0-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:eee3c9b2cd80adee6938ea1828882795e261a7fc6b5ebaed15003ed4d713adaa"}, 262 | {file = "maturin-1.1.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9042ea6538529e22954c0a4eefbe55026a9eba45484423882dd8eb97854b29dd"}, 263 | {file = "maturin-1.1.0-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:4252241c196abf0ede0088e38bc3c181fe0bf073a974d6594493f3ae7232545c"}, 264 | {file = "maturin-1.1.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:6f63dc6f9dba2081346f0ff40019e67a72eb20af7ee4847dc21174dd3636a981"}, 265 | {file = "maturin-1.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:c0fecd5ae4f8bad703ee648873d837e3bd6eb846f48ff8607bfb0556a2010adc"}, 266 | {file = "maturin-1.1.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:19332aa0830f23813e461f61e4d2b7d0c6f8ec84c335040232aafea3f068ac31"}, 267 | {file = "maturin-1.1.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:3f6f1e8e970f7728c26eeb55b4c38103f2c5d830b9df4c12fd00903eef7a4114"}, 268 | {file = "maturin-1.1.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7a2398df2d2f5ba4970ac7f670108e7c7e2da39185caf9b9f9e67d14ae4315e2"}, 269 | {file = "maturin-1.1.0-py3-none-win32.whl", hash = "sha256:32e95212e6b334caf68d278bcc5137dde020a8e84095c2728d9b08d2311e5d64"}, 270 | {file = "maturin-1.1.0-py3-none-win_amd64.whl", hash = "sha256:47705b6c5b5ec9d883f6b4fb6ae2480a07a77aabbfbc658d6327c9d6cd74c7cf"}, 271 | {file = "maturin-1.1.0-py3-none-win_arm64.whl", hash = "sha256:a36efcca897b356deee56c7a3c399c595201518a892ec0f20f0f20abb3064ccb"}, 272 | {file = "maturin-1.1.0.tar.gz", hash = "sha256:4650aeaa8debd004b55aae7afb75248cbd4d61cd7da2dcf4ead8b22b58cecae0"}, 273 | ] 274 | 275 | [[package]] 276 | name = "numba" 277 | version = "0.57.1" 278 | requires_python = ">=3.8" 279 | summary = "compiling Python code using LLVM" 280 | dependencies = [ 281 | "llvmlite<0.41,>=0.40.0dev0", 282 | "numpy<1.25,>=1.21", 283 | ] 284 | files = [ 285 | {file = "numba-0.57.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c078f84b5529a7fdb8413bb33d5100f11ec7b44aa705857d9eb4e54a54ff505"}, 286 | {file = "numba-0.57.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e447c4634d1cc99ab50d4faa68f680f1d88b06a2a05acf134aa6fcc0342adeca"}, 287 | {file = "numba-0.57.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4838edef2df5f056cb8974670f3d66562e751040c448eb0b67c7e2fec1726649"}, 288 | {file = "numba-0.57.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9b17fbe4a69dcd9a7cd49916b6463cd9a82af5f84911feeb40793b8bce00dfa7"}, 289 | {file = "numba-0.57.1-cp311-cp311-win_amd64.whl", hash = "sha256:93df62304ada9b351818ba19b1cfbddaf72cd89348e81474326ca0b23bf0bae1"}, 290 | {file = "numba-0.57.1.tar.gz", hash = "sha256:33c0500170d213e66d90558ad6aca57d3e03e97bb11da82e6d87ab793648cb17"}, 291 | ] 292 | 293 | [[package]] 294 | name = "numpy" 295 | version = "1.24.4" 296 | requires_python = ">=3.8" 297 | summary = "Fundamental package for array computing in Python" 298 | files = [ 299 | {file = "numpy-1.24.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f136bab9c2cfd8da131132c2cf6cc27331dd6fae65f95f69dcd4ae3c3639c810"}, 300 | {file = "numpy-1.24.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e2926dac25b313635e4d6cf4dc4e51c8c0ebfed60b801c799ffc4c32bf3d1254"}, 301 | {file = "numpy-1.24.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:222e40d0e2548690405b0b3c7b21d1169117391c2e82c378467ef9ab4c8f0da7"}, 302 | {file = "numpy-1.24.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7215847ce88a85ce39baf9e89070cb860c98fdddacbaa6c0da3ffb31b3350bd5"}, 303 | {file = "numpy-1.24.4-cp311-cp311-win32.whl", hash = "sha256:4979217d7de511a8d57f4b4b5b2b965f707768440c17cb70fbf254c4b225238d"}, 304 | {file = "numpy-1.24.4-cp311-cp311-win_amd64.whl", hash = "sha256:b7b1fc9864d7d39e28f41d089bfd6353cb5f27ecd9905348c24187a768c79694"}, 305 | {file = "numpy-1.24.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:31f13e25b4e304632a4619d0e0777662c2ffea99fcae2029556b17d8ff958aef"}, 306 | {file = "numpy-1.24.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95f7ac6540e95bc440ad77f56e520da5bf877f87dca58bd095288dce8940532a"}, 307 | {file = "numpy-1.24.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e98f220aa76ca2a977fe435f5b04d7b3470c0a2e6312907b37ba6068f26787f2"}, 308 | {file = "numpy-1.24.4.tar.gz", hash = "sha256:80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463"}, 309 | ] 310 | 311 | [[package]] 312 | name = "python-gnupg" 313 | version = "0.5.1" 314 | summary = "A wrapper for the Gnu Privacy Guard (GPG or GnuPG)" 315 | files = [ 316 | {file = "python-gnupg-0.5.1.tar.gz", hash = "sha256:5674bad4e93876c0b0d3197e314d7f942d39018bf31e2b833f6788a6813c3fb8"}, 317 | {file = "python_gnupg-0.5.1-py2.py3-none-any.whl", hash = "sha256:bf9b2d9032ef38139b7d64184176cd0b293eaeae6e4f93f50e304c7051174482"}, 318 | ] 319 | 320 | [[package]] 321 | name = "referencing" 322 | version = "0.30.0" 323 | requires_python = ">=3.8" 324 | summary = "JSON Referencing + Python" 325 | dependencies = [ 326 | "attrs>=22.2.0", 327 | "rpds-py>=0.7.0", 328 | ] 329 | files = [ 330 | {file = "referencing-0.30.0-py3-none-any.whl", hash = "sha256:c257b08a399b6c2f5a3510a50d28ab5dbc7bbde049bcaf954d43c446f83ab548"}, 331 | {file = "referencing-0.30.0.tar.gz", hash = "sha256:47237742e990457f7512c7d27486394a9aadaf876cbfaa4be65b27b4f4d47c6b"}, 332 | ] 333 | 334 | [[package]] 335 | name = "requests" 336 | version = "2.31.0" 337 | requires_python = ">=3.7" 338 | summary = "Python HTTP for Humans." 339 | dependencies = [ 340 | "certifi>=2017.4.17", 341 | "charset-normalizer<4,>=2", 342 | "idna<4,>=2.5", 343 | "urllib3<3,>=1.21.1", 344 | ] 345 | files = [ 346 | {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, 347 | {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, 348 | ] 349 | 350 | [[package]] 351 | name = "requests-futures" 352 | version = "1.0.1" 353 | summary = "Asynchronous Python HTTP for Humans." 354 | dependencies = [ 355 | "requests>=1.2.0", 356 | ] 357 | files = [ 358 | {file = "requests-futures-1.0.1.tar.gz", hash = "sha256:f55a4ef80070e2858e7d1e73123d2bfaeaf25b93fd34384d8ddf148e2b676373"}, 359 | {file = "requests_futures-1.0.1-py2.py3-none-any.whl", hash = "sha256:4a2f5472e9911a79532137d156aa937cd9cd90fec55677f71b2976d1f7a66d38"}, 360 | ] 361 | 362 | [[package]] 363 | name = "rpds-py" 364 | version = "0.9.2" 365 | requires_python = ">=3.8" 366 | summary = "Python bindings to Rust's persistent data structures (rpds)" 367 | files = [ 368 | {file = "rpds_py-0.9.2-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:e564d2238512c5ef5e9d79338ab77f1cbbda6c2d541ad41b2af445fb200385e3"}, 369 | {file = "rpds_py-0.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f411330a6376fb50e5b7a3e66894e4a39e60ca2e17dce258d53768fea06a37bd"}, 370 | {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e7521f5af0233e89939ad626b15278c71b69dc1dfccaa7b97bd4cdf96536bb7"}, 371 | {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8d3335c03100a073883857e91db9f2e0ef8a1cf42dc0369cbb9151c149dbbc1b"}, 372 | {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d25b1c1096ef0447355f7293fbe9ad740f7c47ae032c2884113f8e87660d8f6e"}, 373 | {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a5d3fbd02efd9cf6a8ffc2f17b53a33542f6b154e88dd7b42ef4a4c0700fdad"}, 374 | {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c5934e2833afeaf36bd1eadb57256239785f5af0220ed8d21c2896ec4d3a765f"}, 375 | {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:095b460e117685867d45548fbd8598a8d9999227e9061ee7f012d9d264e6048d"}, 376 | {file = "rpds_py-0.9.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91378d9f4151adc223d584489591dbb79f78814c0734a7c3bfa9c9e09978121c"}, 377 | {file = "rpds_py-0.9.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:24a81c177379300220e907e9b864107614b144f6c2a15ed5c3450e19cf536fae"}, 378 | {file = "rpds_py-0.9.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:de0b6eceb46141984671802d412568d22c6bacc9b230174f9e55fc72ef4f57de"}, 379 | {file = "rpds_py-0.9.2-cp311-none-win32.whl", hash = "sha256:700375326ed641f3d9d32060a91513ad668bcb7e2cffb18415c399acb25de2ab"}, 380 | {file = "rpds_py-0.9.2-cp311-none-win_amd64.whl", hash = "sha256:0766babfcf941db8607bdaf82569ec38107dbb03c7f0b72604a0b346b6eb3298"}, 381 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:196cb208825a8b9c8fc360dc0f87993b8b260038615230242bf18ec84447c08d"}, 382 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c7671d45530fcb6d5e22fd40c97e1e1e01965fc298cbda523bb640f3d923b387"}, 383 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83b32f0940adec65099f3b1c215ef7f1d025d13ff947975a055989cb7fd019a4"}, 384 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f67da97f5b9eac838b6980fc6da268622e91f8960e083a34533ca710bec8611"}, 385 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:03975db5f103997904c37e804e5f340c8fdabbb5883f26ee50a255d664eed58c"}, 386 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:987b06d1cdb28f88a42e4fb8a87f094e43f3c435ed8e486533aea0bf2e53d931"}, 387 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c861a7e4aef15ff91233751619ce3a3d2b9e5877e0fcd76f9ea4f6847183aa16"}, 388 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:02938432352359805b6da099c9c95c8a0547fe4b274ce8f1a91677401bb9a45f"}, 389 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:ef1f08f2a924837e112cba2953e15aacfccbbfcd773b4b9b4723f8f2ddded08e"}, 390 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:35da5cc5cb37c04c4ee03128ad59b8c3941a1e5cd398d78c37f716f32a9b7f67"}, 391 | {file = "rpds_py-0.9.2-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:141acb9d4ccc04e704e5992d35472f78c35af047fa0cfae2923835d153f091be"}, 392 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:79f594919d2c1a0cc17d1988a6adaf9a2f000d2e1048f71f298b056b1018e872"}, 393 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:a06418fe1155e72e16dddc68bb3780ae44cebb2912fbd8bb6ff9161de56e1798"}, 394 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b2eb034c94b0b96d5eddb290b7b5198460e2d5d0c421751713953a9c4e47d10"}, 395 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8b08605d248b974eb02f40bdcd1a35d3924c83a2a5e8f5d0fa5af852c4d960af"}, 396 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a0805911caedfe2736935250be5008b261f10a729a303f676d3d5fea6900c96a"}, 397 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ab2299e3f92aa5417d5e16bb45bb4586171c1327568f638e8453c9f8d9e0f020"}, 398 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c8d7594e38cf98d8a7df25b440f684b510cf4627fe038c297a87496d10a174f"}, 399 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8b9ec12ad5f0a4625db34db7e0005be2632c1013b253a4a60e8302ad4d462afd"}, 400 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:1fcdee18fea97238ed17ab6478c66b2095e4ae7177e35fb71fbe561a27adf620"}, 401 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:933a7d5cd4b84f959aedeb84f2030f0a01d63ae6cf256629af3081cf3e3426e8"}, 402 | {file = "rpds_py-0.9.2-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:686ba516e02db6d6f8c279d1641f7067ebb5dc58b1d0536c4aaebb7bf01cdc5d"}, 403 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:0173c0444bec0a3d7d848eaeca2d8bd32a1b43f3d3fde6617aac3731fa4be05f"}, 404 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:d576c3ef8c7b2d560e301eb33891d1944d965a4d7a2eacb6332eee8a71827db6"}, 405 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed89861ee8c8c47d6beb742a602f912b1bb64f598b1e2f3d758948721d44d468"}, 406 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1054a08e818f8e18910f1bee731583fe8f899b0a0a5044c6e680ceea34f93876"}, 407 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99e7c4bb27ff1aab90dcc3e9d37ee5af0231ed98d99cb6f5250de28889a3d502"}, 408 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c545d9d14d47be716495076b659db179206e3fd997769bc01e2d550eeb685596"}, 409 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9039a11bca3c41be5a58282ed81ae422fa680409022b996032a43badef2a3752"}, 410 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fb39aca7a64ad0c9490adfa719dbeeb87d13be137ca189d2564e596f8ba32c07"}, 411 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2d8b3b3a2ce0eaa00c5bbbb60b6713e94e7e0becab7b3db6c5c77f979e8ed1f1"}, 412 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:99b1c16f732b3a9971406fbfe18468592c5a3529585a45a35adbc1389a529a03"}, 413 | {file = "rpds_py-0.9.2-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:c27ee01a6c3223025f4badd533bea5e87c988cb0ba2811b690395dfe16088cfe"}, 414 | {file = "rpds_py-0.9.2.tar.gz", hash = "sha256:8d70e8f14900f2657c249ea4def963bed86a29b81f81f5b76b5a9215680de945"}, 415 | ] 416 | 417 | [[package]] 418 | name = "semantic-version" 419 | version = "2.10.0" 420 | requires_python = ">=2.7" 421 | summary = "A library implementing the 'SemVer' scheme." 422 | files = [ 423 | {file = "semantic_version-2.10.0-py2.py3-none-any.whl", hash = "sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177"}, 424 | {file = "semantic_version-2.10.0.tar.gz", hash = "sha256:bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c"}, 425 | ] 426 | 427 | [[package]] 428 | name = "setuptools" 429 | version = "68.0.0" 430 | requires_python = ">=3.7" 431 | summary = "Easily download, build, install, upgrade, and uninstall Python packages" 432 | files = [ 433 | {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"}, 434 | {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"}, 435 | ] 436 | 437 | [[package]] 438 | name = "setuptools-rust" 439 | version = "1.6.0" 440 | requires_python = ">=3.7" 441 | summary = "Setuptools Rust extension plugin" 442 | dependencies = [ 443 | "semantic-version<3,>=2.8.2", 444 | "setuptools>=62.4", 445 | "typing-extensions>=3.7.4.3", 446 | ] 447 | files = [ 448 | {file = "setuptools-rust-1.6.0.tar.gz", hash = "sha256:c86e734deac330597998bfbc08da45187e6b27837e23bd91eadb320732392262"}, 449 | {file = "setuptools_rust-1.6.0-py3-none-any.whl", hash = "sha256:e28ae09fb7167c44ab34434eb49279307d611547cb56cb9789955cdb54a1aed9"}, 450 | ] 451 | 452 | [[package]] 453 | name = "six" 454 | version = "1.16.0" 455 | requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" 456 | summary = "Python 2 and 3 compatibility utilities" 457 | files = [ 458 | {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, 459 | {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, 460 | ] 461 | 462 | [[package]] 463 | name = "termcolor" 464 | version = "2.3.0" 465 | requires_python = ">=3.7" 466 | summary = "ANSI color formatting for output in terminal" 467 | files = [ 468 | {file = "termcolor-2.3.0-py3-none-any.whl", hash = "sha256:3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475"}, 469 | {file = "termcolor-2.3.0.tar.gz", hash = "sha256:b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a"}, 470 | ] 471 | 472 | [[package]] 473 | name = "tomli" 474 | version = "2.0.1" 475 | requires_python = ">=3.7" 476 | summary = "A lil' TOML parser" 477 | files = [ 478 | {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, 479 | {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, 480 | ] 481 | 482 | [[package]] 483 | name = "typing-extensions" 484 | version = "4.7.1" 485 | requires_python = ">=3.7" 486 | summary = "Backported and Experimental Type Hints for Python 3.7+" 487 | files = [ 488 | {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, 489 | {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, 490 | ] 491 | 492 | [[package]] 493 | name = "urllib3" 494 | version = "2.0.4" 495 | requires_python = ">=3.7" 496 | summary = "HTTP library with thread-safe connection pooling, file post, and more." 497 | files = [ 498 | {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, 499 | {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, 500 | ] 501 | 502 | [[package]] 503 | name = "wget" 504 | version = "3.2" 505 | summary = "pure python download utility" 506 | files = [ 507 | {file = "wget-3.2.zip", hash = "sha256:35e630eca2aa50ce998b9b1a127bb26b30dfee573702782aa982f875e3f16061"}, 508 | ] 509 | -------------------------------------------------------------------------------- /list/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "python_complementary_languages" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [ 6 | {name = "Federico Simonetta", email = "federicosimonetta@zoho.com"}, 7 | ] 8 | dependencies = [ 9 | "julia-project>=0.1.27", 10 | "cython>=3.0.0", 11 | "numba>=0.57.1", 12 | "maturin>=1.1.0", 13 | "setuptools-rust>=1.6.0", 14 | ] 15 | requires-python = "==3.11.4" 16 | readme = "README.md" 17 | license = {text = "MIT"} 18 | 19 | [tool.pdm.scripts] 20 | # install_pip = "python -m ensurepip" 21 | # update_pip = "python -m pip install -U pip" 22 | # update_cython = "python -m pip install -U cython" 23 | build_setuptools = "python setup.py build_ext --inplace" 24 | nimpy = "nimble install nimpy" 25 | build_nim = "nim c -d:danger --out:list_nim.so list_nim.nim" 26 | # post_install = { composite=["install_pip", "update_pip", "update_cython", "build_setuptools", "build_nim"] } 27 | post_install = { composite=["build_setuptools", "nimpy", "build_nim"] } 28 | 29 | [build-system] 30 | requires = ["setuptools-rust", "setuptools", "Cython", "julia-project"] 31 | -------------------------------------------------------------------------------- /list/pyproject.toml.back: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "cython_test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Federico Simonetta "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "3.9.6" 9 | Cython = "^0.29.22" 10 | maturin = "^0.10.3" 11 | julia = "^0.5.6" 12 | numpy = "^1.20.2" 13 | numba = "^0.53.1" 14 | setuptools-rust = "^0.12.1" 15 | 16 | [tool.poetry.dev-dependencies] 17 | 18 | [build-system] 19 | requires = ["poetry-core>=1.0.0", "setuptools", "wheel", "setuptools-rust"] 20 | build-backend = "poetry.core.masonry.api" 21 | -------------------------------------------------------------------------------- /list/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # shutup prompts 4 | os.environ["JULIA_PROJECT_INSTALL_JULIA"] = "y" 5 | os.environ["JULIA_PROJECT_COMPILE"] = "y" 6 | os.environ["JULIA_PROJECT_DEPOT"] = "y" 7 | import shutil 8 | 9 | # downloaidng Julia, updating packages, and compiling 10 | from _julia_project import myjuliaproject 11 | 12 | myjuliaproject.ensure_init() 13 | myjuliaproject.update() 14 | shutil.copy("Project.toml", "sys_image/Project.toml") 15 | myjuliaproject.compile() 16 | 17 | from setuptools import setup 18 | from setuptools_rust import Binding, RustExtension 19 | 20 | setup( 21 | name="list_rust", 22 | rust_extensions=[RustExtension("list_rust", binding=Binding.PyO3, debug=False)], 23 | # rust extensions are not zip safe, just like C-extensions. 24 | zip_safe=False, 25 | ) 26 | 27 | 28 | from Cython.Build import Cythonize 29 | 30 | Cythonize.main(["*[!list_numba|main|simple_list]*.py", "-3", "--inplace"]) 31 | Cythonize.main(["*.pyx", "-3", "--inplace"]) 32 | # for path in paths: 33 | # Cythonize.main([path, "-3", "--inplace"]) 34 | -------------------------------------------------------------------------------- /list/simple_list.py: -------------------------------------------------------------------------------- 1 | def iterate_list(a_list): 2 | 3 | count = 0 4 | for i in range(len(a_list)): 5 | for j in range(len(a_list[i])): 6 | count += a_list[i][j] 7 | print(count) 8 | return count 9 | 10 | 11 | def make_list(a_list): 12 | for i in range(10**4): 13 | new_list = [] 14 | for j in range(10**4): 15 | new_list.append(0.01) 16 | a_list.append(new_list) 17 | return a_list 18 | -------------------------------------------------------------------------------- /list/src/example_package/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/00sapo/Python-Complementary-Languages/10eb5b615fa2871470fca904d819de5b3c3df782/list/src/example_package/__init__.py -------------------------------------------------------------------------------- /list/src/list_rust.rs: -------------------------------------------------------------------------------- 1 | use pyo3::prelude::*; 2 | use pyo3::wrap_pyfunction; 3 | use rayon::prelude::*; 4 | 5 | #[pyfunction] 6 | fn iterate_list(py: Python, a_list: Vec>) -> f64 { 7 | // let count = a_list.iter().map(|l| l.iter().sum::()).sum::(); 8 | let count = py.allow_threads(|| a_list.par_iter().map(|l| l.iter().sum::()).sum::()); 9 | println!("{}", count); 10 | 11 | return count; 12 | } 13 | 14 | #[pyfunction] 15 | fn make_list(mut a_list: Vec>) -> Vec> { 16 | for _i in 0..i64::pow(10, 4) { 17 | let mut new_list = Vec::::new(); 18 | for _j in 0..i64::pow(10, 4) { 19 | new_list.push(0.01_f64); 20 | } 21 | a_list.push(new_list); 22 | } 23 | return a_list; 24 | } 25 | 26 | #[pymodule] 27 | fn list_rust(_py: Python, m: &PyModule) -> PyResult<()> { 28 | m.add_function(wrap_pyfunction!(iterate_list, m)?).unwrap(); 29 | m.add_function(wrap_pyfunction!(make_list, m)?).unwrap(); 30 | 31 | Ok(()) 32 | } 33 | -------------------------------------------------------------------------------- /list/sys_image/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" 3 | PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" 4 | ThreadedIterables = "11d239b0-c0b9-11e8-1935-d5cfa53abb03" 5 | -------------------------------------------------------------------------------- /list/sys_image/packages.jl: -------------------------------------------------------------------------------- 1 | [:ThreadedIterables, :PyCall] 2 | -------------------------------------------------------------------------------- /list/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/00sapo/Python-Complementary-Languages/10eb5b615fa2871470fca904d819de5b3c3df782/list/tests/__init__.py --------------------------------------------------------------------------------