{"id":18499377,"url":"https://github.com/theodus/pony-benchmark","last_synced_at":"2026-01-24T12:07:27.672Z","repository":{"id":142321011,"uuid":"115962310","full_name":"Theodus/pony-benchmark","owner":"Theodus","description":"Improved Micro-Benchmarking for Pony","archived":false,"fork":false,"pushed_at":"2018-02-28T14:19:14.000Z","size":359,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-30T08:24:16.693Z","etag":null,"topics":["benchmarking","microbenchmarks","pony-language"],"latest_commit_sha":null,"homepage":null,"language":"Pony","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/Theodus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-02T01:39:52.000Z","updated_at":"2021-03-24T02:23:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"170ecce5-d0a6-40db-a924-cc5f8e1ce24c","html_url":"https://github.com/Theodus/pony-benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Theodus/pony-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theodus%2Fpony-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theodus%2Fpony-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theodus%2Fpony-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theodus%2Fpony-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Theodus","download_url":"https://codeload.github.com/Theodus/pony-benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theodus%2Fpony-benchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28727383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["benchmarking","microbenchmarks","pony-language"],"created_at":"2024-11-06T13:45:43.834Z","updated_at":"2026-01-24T12:07:27.658Z","avatar_url":"https://github.com/Theodus.png","language":"Pony","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PonyBench (Version 2)\n\n## Standard Output:\n\n#### Pony Code\n```pony\nactor Main is BenchmarkList\n  new create(env: Env) =\u003e\n    PonyBench(env, this)\n\n  fun tag benchmarks(bench: PonyBench) =\u003e\n    bench(Fib(5))\n    bench(Fib(10))\n    bench(Fib(20))\n    bench(Fib(40))\n\nclass iso Fib is MicroBenchmark\n  let _n: U64\n\n  new iso create(n: U64) =\u003e\n    _n = n\n\n  fun name(): String =\u003e\n    \"Fib(\" + _n.string() + \")\"\n\n  fun apply() =\u003e\n    DoNotOptimise[U64](_fib(_n))\n    DoNotOptimise.observe()\n\n  fun _fib(n: U64): U64 =\u003e\n    if n \u003c 2 then 1\n    else _fib(n - 1) + _fib(n - 2)\n    end\n```\n\n#### Output\n```\n$ ponyc -V0 --runtimebc examples/simple -b simple \u0026\u0026 ./simple --ponynoyield\nBenchmark results will have their mean and median adjusted for overhead.\nYou may disable this with --noadjust.\n\nBenchmark                                   mean            median   deviation  iterations\nFib(5)                                     15 ns             16 ns      ±0.11%     1000000\nFib(10)                                   180 ns            180 ns      ±0.55%      500000\nFib(20)                                 21525 ns          21511 ns      ±0.30%       10000\nFib(40)                             324952472 ns      324871552 ns      ±0.21%           1\n```\n\n## CSV Output\n\n#### Output\n```bash\n$ ponyc -V0 --runtimebc examples/custom-config -b custom-config \u0026\u0026 ./custom-config --ponynoyield -csv \u003e data.csv\n```\n\n#### Matlab Code (Visualization example)\n```matlab\nclose all; clear; clc\n\nM = csvread('data.csv',0,1);\nM = M'; % transpose so that results are column vectors\noverhead = median(M(:,1:2:end));\nops = M(:,2:2:end);\npows = 0:1:20;\nsizes = 2.^pows;\n\n%% box plot\nboxplot(ops-overhead)\ngrid on\nxticklabels('2^'+string(pows))\ntitle('Persistent Vec Apply')\nxlabel('size')\nylabel('runtime (ns)')\nax = gca;\nax.FontSize = 24;\n\n%% histogram\nfigure\nidxs = fliplr(5+1:5:21);\nfor i = idxs\n    histogram(ops(:,i)-overhead(i))\n    hold on\nend\ntitle('Histogram of Persistent Vec Apply (sizes 32^n)')\nlegend('size ' + string(sizes(idxs)))\nxlabel('runtime (ns)')\nylabel('occurences')\nax = gca;\nax.FontSize = 24;\n```\n\n#### Charts\n![alt text](https://github.com/Theodus/pony-benchmark/raw/master/examples/custom-config/charts/box.jpg)\n\n![alt text](https://github.com/Theodus/pony-benchmark/raw/master/examples/custom-config/charts/hist.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodus%2Fpony-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodus%2Fpony-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodus%2Fpony-benchmark/lists"}