{"id":22988988,"url":"https://github.com/isaac-defrain/bench","last_synced_at":"2025-04-02T11:43:47.897Z","repository":{"id":49749519,"uuid":"515366982","full_name":"Isaac-DeFrain/bench","owner":"Isaac-DeFrain","description":"Benchmarking OCaml patterns","archived":false,"fork":false,"pushed_at":"2022-07-30T23:36:08.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-08T02:43:48.732Z","etag":null,"topics":["benchmark","ocaml"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/Isaac-DeFrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-18T23:05:39.000Z","updated_at":"2022-07-21T20:51:19.000Z","dependencies_parsed_at":"2022-08-30T17:22:17.324Z","dependency_job_id":null,"html_url":"https://github.com/Isaac-DeFrain/bench","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/Isaac-DeFrain%2Fbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isaac-DeFrain%2Fbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isaac-DeFrain%2Fbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isaac-DeFrain%2Fbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Isaac-DeFrain","download_url":"https://codeload.github.com/Isaac-DeFrain/bench/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246811244,"owners_count":20837745,"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","ocaml"],"created_at":"2024-12-15T04:15:32.083Z","updated_at":"2025-04-02T11:43:47.864Z","avatar_url":"https://github.com/Isaac-DeFrain.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bench\n\nBenchmarking differnet patterns in OCaml\n\n## Benchmarking\n\nTo do the benchmark on your own machine, clone the repo\n\n```bash\n$ git clone https://github.com/Isaac-DeFrain/bench.git\n$ cd bench\n```\n\nInstall dependencies and build\n\n```bash\n$ opam install --deps-only .\n$ dune build\n```\n\nTo run the desired benchmarks, uncomment the appropriate line in `./bin/main.ml` and do\n\n```bash\n$ dune exec -- ./_build/default/bin/main.exe\n```\n\n## Discoveries\n\nHere are some interesting discoveries:\n\n- manipulating ADTs is slightly slower than manipulating the correponding GADTs\n- pattern matching on ADTs is faster than the corresponding GADTs\n- `Async` functions are faster then their `Stdlib` counterparts and significantly faster than their `Lwt` counterparts\n- `Stdlib` functions are faster than their `Base` library counterparts\n- tail-recursive list pattern matching is faster than folding over a list\n- updating a mutable reference is faster than tail-recursion\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaac-defrain%2Fbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaac-defrain%2Fbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaac-defrain%2Fbench/lists"}