{"id":18016923,"url":"https://github.com/fitzgen/code-size-benchmarks","last_synced_at":"2025-04-04T15:32:59.407Z","repository":{"id":47405341,"uuid":"141357101","full_name":"fitzgen/code-size-benchmarks","owner":"fitzgen","description":"Rust and WebAssembly code size micro benchmarks","archived":false,"fork":false,"pushed_at":"2018-07-17T23:41:31.000Z","size":9,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T11:59:39.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fitzgen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-17T23:38:59.000Z","updated_at":"2023-09-08T08:20:00.000Z","dependencies_parsed_at":"2022-09-06T10:11:43.256Z","dependency_job_id":null,"html_url":"https://github.com/fitzgen/code-size-benchmarks","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/fitzgen%2Fcode-size-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Fcode-size-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Fcode-size-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Fcode-size-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzgen","download_url":"https://codeload.github.com/fitzgen/code-size-benchmarks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247202685,"owners_count":20900828,"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":[],"created_at":"2024-10-30T04:19:41.860Z","updated_at":"2025-04-04T15:32:59.386Z","avatar_url":"https://github.com/fitzgen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust and Wasm Code Size Benchmarks\n\nA collection of (mostly micro) benchmark Rust programs to keep an eye on\nWebAssembly code size.\n\nRuns `wasm-gc` (to remove DWARF debugging custom sections) but does not run\n`wasm-opt` or `wasm-snip` or any of the other common tools on the built `.wasm`\nfiles.\n\nUses `opt-level = \"s\"` and `debug = false`.\n\n## Run the Benchmarks\n\n```\n./sizes.sh\n```\n\nThis will report the byte sizes of the emitted `.wasm` binaries to `stdout`.\n\n## Synthetic Benchmarks\n\nVery small, targeted, synthetic benchmarks.\n\n* `allocator-system`: A `.wasm` binary that exports the system allocator's\n  (which is dlmalloc for `wasm32-unknown-unknown` at the time of writing)\n  functionality to the host.\n\n* `allocator-wee-alloc`: The same as `allocator-system` but with `wee_alloc`.\n\n* `panic-empty`: Exports a single function that invokes the `panic!()` macro\n  without any arguments.\n\n* `panic-in-bounds-check`: Exports a single function that constructs a slice and\n  indexes into it in a way such that the bounds check can't be elided by the\n  compiler, and so it might panic.\n\n* `panic-in-unwrap`: Exports a single function that unwraps a result,\n  potentially panicking.\n\n* `panic-with-dynamic-message`: Exports a single function that invokes the\n  `panic!()` macro with a dynamic string message.\n\n* `panic-with-static-message`: Exports a single function that invokes the\n  `panic!()` macro with a `\u0026static str` message.\n\n* `regular-expressions`: Exports a function that takes a regular expression\n  string and an input string, uses the `regex` crate to compile the regular\n  expression string, and then returns whether the input string is a match or\n  not.\n\n## Real World Libraries\n\n* `source-map-mappings`: The WebAssembly core of the `mozilla/source-map`\n  JavaScript library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzgen%2Fcode-size-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffitzgen%2Fcode-size-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzgen%2Fcode-size-benchmarks/lists"}