{"id":16361869,"url":"https://github.com/enet4/julia-bench-rs","last_synced_at":"2025-07-28T07:03:48.093Z","repository":{"id":21622823,"uuid":"92852545","full_name":"Enet4/julia-bench-rs","owner":"Enet4","description":"Rust implementation of the Julia micro benchmark","archived":false,"fork":false,"pushed_at":"2025-07-23T12:50:40.000Z","size":116,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-23T14:41:25.412Z","etag":null,"topics":["benchmark","julia","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Enet4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-30T16:18:21.000Z","updated_at":"2025-07-23T12:50:44.000Z","dependencies_parsed_at":"2022-08-07T10:00:58.364Z","dependency_job_id":null,"html_url":"https://github.com/Enet4/julia-bench-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Enet4/julia-bench-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enet4%2Fjulia-bench-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enet4%2Fjulia-bench-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enet4%2Fjulia-bench-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enet4%2Fjulia-bench-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Enet4","download_url":"https://codeload.github.com/Enet4/julia-bench-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enet4%2Fjulia-bench-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267475779,"owners_count":24093356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","julia","rust"],"created_at":"2024-10-11T02:15:03.142Z","updated_at":"2025-07-28T07:03:48.066Z","avatar_url":"https://github.com/Enet4.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Julia's micro-bench in Rust\n\n[![Rust CI](https://github.com/Enet4/julia-bench-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/Enet4/julia-bench-rs/actions/workflows/rust.yml) [![dependency status](https://deps.rs/repo/github/Enet4/julia-bench-rs/status.svg)](https://deps.rs/repo/github/Enet4/julia-bench-rs)\n\nThis repository attempts to replicate the [micro benchmark](https://github.com/JuliaLang/julia/tree/master/test/perf/micro) in the Julia repository ([/test/perf](https://github.com/JuliaLang/julia/tree/master/test/perf)) with a Rust implementation, which aims to make a general performance comparison among other programming languages.\n\nThe resulting program is based on the C implementation, but it's still mostly idiomatic Rust and does not have unsafe code.\n\nThis program has two modes:\n\n- By default, benchmarks with matrices (`randmatstat` and `randmatmul`) will use `ndarray` with experimental BLAS support.\n\n- With the `direct_blas` Cargo feature, these benchmarks will use the C BLAS API directly via the `cblas` crate, which is currently faster but requires unsafe code.\n\nIn both cases, OpenBLAS is used as the BLAS implementation.\n\nThe project is experimental, and might still have bugs or unfair optimizations. Feel free to point them out if you find them.\n\n## Building and running\n\nThis program uses a specific Rust **nightly** toolchain to work.\nIf you are using [Rustup](), it should automatically pick up the toolchain mentioned in [rust-toolchain.toml](rust-toolchain.toml).~\n\nThen:\n\n```bash\ncargo run --release\n```\n\nTo run the direct BLAS version instead:\n\n```bash\ncargo run --release --features direct_blas\n```\n\n## Results\n\nThe Rust benchmarks (using nightly-2018-04-16) were compared with C (`-O3`) and Julia on the same machine.\n\n![](benchmarks.svg)\n\n| cputime |  lang\n|---------|--------------------\n| 1.000   |  C\n| 1.000   |  Rust (direct BLAS)\n| 1.060   |  Rust\n| 1.180   |  Julia\n\nMost benchmarks are faster in Rust than in Julia, sometimes even faster than C. The `fibonacci` benchmark relies on `black_box`, and so might not be very well optimized. These results also depend on the toolchain used.\n\n## License\n\nApache-2.0 / MIT\n\nThis code is based on the C implementation of the benchmark, with the MIT license:\n\n\u003e Copyright (c) 2009-2016: Jeff Bezanson, Stefan Karpinski, Viral B. Shah,\n\u003e and other contributors:\n\u003e\n\u003e https://github.com/JuliaLang/julia/contributors\n\u003e\n\u003e Permission is hereby granted, free of charge, to any person obtaining\n\u003e a copy of this software and associated documentation files (the\n\u003e \"Software\"), to deal in the Software without restriction, including\n\u003e without limitation the rights to use, copy, modify, merge, publish,\n\u003e distribute, sublicense, and/or sell copies of the Software, and to\n\u003e permit persons to whom the Software is furnished to do so, subject to\n\u003e the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be\n\u003e included in all copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n\u003e EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\u003e MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n\u003e NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n\u003e LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n\u003e OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n\u003e WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenet4%2Fjulia-bench-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenet4%2Fjulia-bench-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenet4%2Fjulia-bench-rs/lists"}