{"id":13726795,"url":"https://github.com/darklang/fizzboom","last_synced_at":"2025-05-09T02:17:07.028Z","repository":{"id":37177417,"uuid":"296217988","full_name":"darklang/fizzboom","owner":"darklang","description":"Benchmark to compare async web server + interpreter + web client implementations across various languages","archived":false,"fork":false,"pushed_at":"2023-03-24T23:53:48.000Z","size":482,"stargazers_count":46,"open_issues_count":12,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T02:17:00.372Z","etag":null,"topics":["benchmark","fizzbuzz","fsharp","interpreter","ocaml","rust","webserver"],"latest_commit_sha":null,"homepage":"https://blog.darklang.com/fizzboom-benchmark/","language":"F#","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/darklang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2020-09-17T04:21:49.000Z","updated_at":"2024-11-05T00:31:27.000Z","dependencies_parsed_at":"2024-01-06T07:49:37.043Z","dependency_job_id":"bb1ef19d-33a6-411b-9fd2-a9577c45c23c","html_url":"https://github.com/darklang/fizzboom","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/darklang%2Ffizzboom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darklang%2Ffizzboom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darklang%2Ffizzboom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darklang%2Ffizzboom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darklang","download_url":"https://codeload.github.com/darklang/fizzboom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176443,"owners_count":21866143,"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":["benchmark","fizzbuzz","fsharp","interpreter","ocaml","rust","webserver"],"created_at":"2024-08-03T01:03:22.802Z","updated_at":"2025-05-09T02:17:07.006Z","avatar_url":"https://github.com/darklang.png","language":"F#","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"Benchmark the same async program across Rust, OCaml, and F#.\n\nThese days, it's mostly used to benchmark F# in various different configurations.\n\n# Benchmark overview\n\nThis is a benchmark to test what's the best language for implementing Dark in.\nDark already has [an\nimplementation](https://github.com/darklang/dark/blob/main/backend/libexecution/ast.ml),\nbut we are looking for improvements, especially around async.\n\nThe benchmark is fizzbuzz: using an interpreter connected to web server,\ndynamically calculate fizzbuzz and return it as a JSON response. This is to\ntest the raw speed of the HTTP server and interpreter.\n\nThe most important metric is _requests/second_.\n\n# Contributing\n\nNo-one likes to see their favorite language lose at benchmarks, so please feel\nfree to submit pull requests to improve existing benchmarks, or add new\nvariations (different web servers, new languages/frameworks, etc). Some rules:\n\n- the interpreter must be easy to update, add to, and improve. As such, no\n  microoptimizations, assembly code, JITs, etc. However, it is fine to:\n  - add one-off fixes that for example, improve the compiler optimization\n    settings, the webserver configuration, etc. Whatever you'd use for best\n    performance in production is fine.\n  - if the code had bad performance that's unfairly penalizing your language\n    (eg due to a compiler bug), it's fine to propose alternatives\n  - fix existing bad code (eg if data is being copied unnecessarily)\n  - provide code review for existing implementations\n- I can't imagine all the ways that people will try to game this, so I'm\n  definitely going to reject things that don't support how we'd actually want\n  to write Dark's backend. New rules will come as this happens.\n\n## Overview of codebase\n\nThe benchmark is implemented in [measure.py](measure.py). Requires [wrk](https://github.com/wg/wrk) to be installed.\n\nRun `./measure` to test all the fizzbuzz implementations, or\n`./measure \u003cdirectory_name1\u003e \u003cdirectory_name2\u003e \u003cetc\u003e` to test a subset\nof them.\n\n### Benchmarks\n\nEach benchmark candidate is in its own directory, which has some known files:\n\n- `./install.sh` - installs dependencies\n- `./build.sh` - builds the server. This should use release configuration\n- `./run.sh` - runs the server on port 5000\n- `BROKEN` - if this file exists, skip the implementation in this directory\n\nBenchmarks implement a HTTP server connected to an interpreter which each\nimplement a simple subset of the dark language.\n\nThe purpose of the benchmark is to establish:\n\n- how fast the language is\n- what is the cost of async\n- test variations of using async to see how performance can be improved\n\nThe sync implementation helps us figure out a baseline for the performance. We\ncan then compare the sync and async implementation on fizzbuzz to see how much\nasync costs.\n\nDifferent languages can be compared async-vs-async for (which is raw performance\ngiven fizzbuzz constraints).\n\nThe optimized async implementation is to see the value of different\noptimizations and see if there are ways to optimize above a baseline async\nimplementation.\n\n## Results\n\nRecent results are posted to the [Result issue](https://github.com/darklang/fizzboom/issues/13)\n\n## Code of Conduct\n\nDark's community is held to the Dark [Code of Conduct](./CODE-OF-CONDUCT.md).\nBenchmarks can be contentious, please be kind to all people involved.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarklang%2Ffizzboom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarklang%2Ffizzboom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarklang%2Ffizzboom/lists"}