{"id":18605750,"url":"https://github.com/coasterfreakde/dna-kmer-speed-test","last_synced_at":"2025-04-10T20:31:08.174Z","repository":{"id":115577286,"uuid":"571553595","full_name":"CoasterFreakDE/DNA-Kmer-Speed-Test","owner":"CoasterFreakDE","description":"DNA Kmer speed test in different languagues","archived":false,"fork":false,"pushed_at":"2024-09-03T22:16:35.000Z","size":127,"stargazers_count":4,"open_issues_count":9,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T04:04:12.751Z","etag":null,"topics":["coding","differences","speed","test"],"latest_commit_sha":null,"homepage":"https://towardsdatascience.com/how-fast-is-c-compared-to-python-978f18f474c7","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoasterFreakDE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["CoasterFreakDE"]}},"created_at":"2022-11-28T11:40:15.000Z","updated_at":"2024-05-16T09:36:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c68658e-48b4-48a8-9b20-4da8775bc923","html_url":"https://github.com/CoasterFreakDE/DNA-Kmer-Speed-Test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoasterFreakDE%2FDNA-Kmer-Speed-Test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoasterFreakDE%2FDNA-Kmer-Speed-Test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoasterFreakDE%2FDNA-Kmer-Speed-Test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoasterFreakDE%2FDNA-Kmer-Speed-Test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoasterFreakDE","download_url":"https://codeload.github.com/CoasterFreakDE/DNA-Kmer-Speed-Test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290032,"owners_count":21078923,"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","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":["coding","differences","speed","test"],"created_at":"2024-11-07T02:22:58.262Z","updated_at":"2025-04-10T20:31:07.875Z","avatar_url":"https://github.com/CoasterFreakDE.png","language":"C","funding_links":["https://github.com/sponsors/CoasterFreakDE"],"categories":[],"sub_categories":[],"readme":"![1_-ttbjLpp9HMrpWdzSPckZQ](https://user-images.githubusercontent.com/28011628/204269417-e3068e15-e3f7-4cb1-9528-6df97f61ae25.png)\n\n# DNA-Kmer-Speed-Test\n\nDNA Kmer speed test in different languagues\n\nIn order to understand the background of this test, visit the original article here: https://towardsdatascience.com/how-fast-is-c-compared-to-python-978f18f474c7\n\n### How to run the test\n\n1. Clone the repository\n2. Install the dependencies\n3. Run `make LENGTH=11 -s` to run the test with kmer length 11\n4. Or use `make LENGTH=13 LANGUAGES=\"go c cpp rust\" -s` to run the test with kmer length 13 and only for the languages go, c, cpp and rust\n\n### Or run the test with docker\n\n1. Clone the repository\n2. Install docker\n3. Build a docker image using `docker build -t kmers .`\n4. Run and connect to the container with `docker run --rm -it kmers`\n5. Start the test with `./generate.sh 1 10 \u003e\u003e data.txt`\n6. Read the results with `cat data.txt`\n\n### Kmer - Operation Amount\n\n| Kmer | Generated      |\n| ---- | -------------- |\n| 11   | 4.194.304      |\n| 12   | 16.777.216     |\n| 13   | 67.108.864     |\n| 14   | 268.435.456    |\n| 15   | 1.073.741.824  |\n| 16   | 4.294.967.296  |\n| 17   | 17.179.869.184 |\n\n# Test Results\n\n##### Automated test results\n\nYou can find the automated test results at https://github.com/CoasterFreakDE/DNA-Kmer-Speed-Test/actions\nNote that the results are not 100% accurate, because the test is run on a shared server with other processes running in the background.\n\n## Comparison of the languages\n\n| Language   | Kmer 11 | Kmer 12 | Kmer 13 | Kmer 14 | Kmer 15  | Kmer 16 | Kmer 17  | (Optional) Runtime Env / OS     |\n| ---------- | ------- | ------- | ------- | ------- | -------- | ------- | -------- | ------------------------------- |\n| C          | 3ms     | 12ms    | 45ms    | 181ms   | 753ms    | 2.887s  | 12.926s  | Win11 / i9-12900KF              |\n| C++        | 3ms     | 11ms    | 55ms    | 309ms   | 1.062s   | 4.149s  | 15.784s  | Win11 / i9-12900KF              |\n| Rust       | 5ms     | 23ms    | 94ms    | 365ms   | 1.195s   | 4.499s  | 17.949s  | Win11 / i9-12900KF              |\n| Go         | 13ms    | 53ms    | 213ms   | 835ms   | 3.553s   | 12.429s | 49.861s  | Win11 / i9-12900KF              |\n| Java       | 17ms    | 50ms    | 158ms   | 599ms   | 2.703s   | /       | /        | Win11 / i9-12900KF              |\n| JavaScript | 58ms    | 225ms   | 894ms   | 3.467s  | 14.543s  | /       | /        | Win11 / i9-12900KF              |\n| C#         | 98ms    | 333ms   | 1.207s  | 4.588s  | 18.205s  | 72.196s | 265.764s | Win11 / i9-12900KF              |\n| Swift      | 184ms   | 765ms   | 3.034s  | 12.73s  | 49.86s   | /       | /        | Win11 / i5-12400F               |\n| Mojo       | 319ms   | 1.289s  | 5.090s  | 20.944s | 83.584s  | /       | /        | Win11 / i9-12900KF (WSL Ubuntu) |\n| Erlang     | 375ms   | 1.607s  | 6.397s  | 25.117s | 105.529s | /       | /        | Win11 / i9-12900KF              |\n| php        | 561ms   | 2.164s  | 8.892s  | 35.038s | 140.391s | /       | /        | Win11 / i9-12900KF              |\n| Perl       | 643ms   | 2.568s  | 10.182s | 41.137s | 169.598s | /       | /        | Win11 / i9-12900KF              |\n| Python     | 2.266s  | 8.850s  | 35.374s | 99.665s | 414.169s | /       | /        | Win11 / i9-12900KF              |\n\n## Splitting the results into languages\n\n### C\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.003s   | Win11 / i9-12900KF          |\n| 12   | 0.012s   | Win11 / i9-12900KF          |\n| 13   | 0.045s   | Win11 / i9-12900KF          |\n| 14   | 0.181s   | Win11 / i9-12900KF          |\n| 15   | 0.753s   | Win11 / i9-12900KF          |\n| 16   | 2.887s   | Win11 / i9-12900KF          |\n| 17   | 13.926s  | Win11 / i9-12900KF          |\n\n### C++\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.003s   | Win11 / i9-12900KF          |\n| 12   | 0.011s   | Win11 / i9-12900KF          |\n| 13   | 0.055s   | Win11 / i9-12900KF          |\n| 14   | 0.309s   | Win11 / i9-12900KF          |\n| 15   | 1.062s   | Win11 / i9-12900KF          |\n| 16   | 4.149s   | Win11 / i9-12900KF          |\n| 17   | 15.784s  | Win11 / i9-12900KF          |\n\n### C#\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.098s   | Win11 / i9-12900KF          |\n| 12   | 0.333s   | Win11 / i9-12900KF          |\n| 13   | 1,207s   | Win11 / i9-12900KF          |\n| 14   | 4.588s   | Win11 / i9-12900KF          |\n| 15   | 18.205s  | Win11 / i9-12900KF          |\n| 16   | 72.196s  | Win11 / i9-12900KF          |\n| 17   | 265.764s | Win11 / i9-12900KF          |\n\n### Erlang\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.375s   | Win11 / i9-12900KF          |\n| 12   | 1.607s   | Win11 / i9-12900KF          |\n| 13   | 6.397s   | Win11 / i9-12900KF          |\n| 14   | 25.117s  | Win11 / i9-12900KF          |\n| 15   | 105.529s | Win11 / i9-12900KF          |\n\n### Go\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.013s   | Win11 / i9-12900KF          |\n| 12   | 0.053s   | Win11 / i9-12900KF          |\n| 13   | 0.213s   | Win11 / i9-12900KF          |\n| 14   | 0.835s   | Win11 / i9-12900KF          |\n| 15   | 3.553s   | Win11 / i9-12900KF          |\n| 16   | 12.429s  | Win11 / i9-12900KF          |\n| 17   | 49.861s  | Win11 / i9-12900KF          |\n\n### Java\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.017s   | Win11 / i9-12900KF          |\n| 12   | 0.050s   | Win11 / i9-12900KF          |\n| 13   | 0.158s   | Win11 / i9-12900KF          |\n| 14   | 0.599s   | Win11 / i9-12900KF          |\n| 15   | 2.703s   | Win11 / i9-12900KF          |\n\n### JavaScript\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.058s   | Win11 / i9-12900KF          |\n| 12   | 0.225s   | Win11 / i9-12900KF          |\n| 13   | 0.894s   | Win11 / i9-12900KF          |\n| 14   | 3.467s   | Win11 / i9-12900KF          |\n| 15   | 14.543s  | Win11 / i9-12900KF          |\n\n### Perl\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.643s   | Win11 / i9-12900KF          |\n| 12   | 2.568    | Win11 / i9-12900KF          |\n| 13   | 10.182s  | Win11 / i9-12900KF          |\n| 14   | 41.137s  | Win11 / i9-12900KF          |\n| 15   | 169.598s | Win11 / i9-12900KF          |\n\n### Python\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 2.266s   | Win11 / i9-12900KF          |\n| 12   | 8.850s   | Win11 / i9-12900KF          |\n| 13   | 35.374s  | Win11 / i9-12900KF          |\n| 14   | 99.665s  | Win11 / i9-12900KF          |\n| 15   | 414.169s | Win11 / i9-12900KF          |\n\n### Mojo\n\n| Kmer | Duration | (Optional) Runtime Env / OS     |\n| ---- | -------- | ------------------------------- |\n| 11   | 319ms    | Win11 / i9-12900KF (WSL Ubuntu) |\n| 12   | 1.289s   | Win11 / i9-12900KF (WSL Ubuntu) |\n| 13   | 5.090s   | Win11 / i9-12900KF (WSL Ubuntu) |\n| 14   | 20.944s  | Win11 / i9-12900KF (WSL Ubuntu) |\n| 15   | 83.584s  | Win11 / i9-12900KF (WSL Ubuntu) |\n\n### Rust\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.005s   | Win11 / i9-12900KF          |\n| 12   | 0.023s   | Win11 / i9-12900KF          |\n| 13   | 0.094s   | Win11 / i9-12900KF          |\n| 14   | 0.365s   | Win11 / i9-12900KF          |\n| 15   | 1.195s   | Win11 / i9-12900KF          |\n| 16   | 4.499s   | Win11 / i9-12900KF          |\n| 17   | 17.949s  | Win11 / i9-12900KF          |\n\n### php\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.561s   | Win11 / i9-12900KF          |\n| 12   | 2.164s   | Win11 / i9-12900KF          |\n| 13   | 8.892s   | Win11 / i9-12900KF          |\n| 14   | 35.038s  | Win11 / i9-12900KF          |\n| 15   | 140.391s | Win11 / i9-12900KF          |\n\n### Swift\n\n| Kmer | Duration | (Optional) Runtime Env / OS |\n| ---- | -------- | --------------------------- |\n| 11   | 0.184s   | Win11 / i5-12400F           |\n| 12   | 0.765s   | Win11 / i5-12400F           |\n| 13   | 3.034s   | Win11 / i5-12400F           |\n| 14   | 12.73s   | Win11 / i5-12400F           |\n| 15   | 49.86s   | Win11 / i5-12400F           |\n\n# Now it's your turn!\n\nParticipate in this public repository with your favourite language\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoasterfreakde%2Fdna-kmer-speed-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoasterfreakde%2Fdna-kmer-speed-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoasterfreakde%2Fdna-kmer-speed-test/lists"}