{"id":24089437,"url":"https://github.com/longbridge/parser-benchmark","last_synced_at":"2026-05-10T12:52:37.877Z","repository":{"id":65771104,"uuid":"596849926","full_name":"longbridge/parser-benchmark","owner":"longbridge","description":"Benchmark parsers","archived":false,"fork":false,"pushed_at":"2023-02-09T07:03:22.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-01-10T04:13:07.277Z","etag":null,"topics":["nom","parser","peg","pest"],"latest_commit_sha":null,"homepage":"","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/longbridge.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-03T03:48:53.000Z","updated_at":"2023-09-19T07:40:47.000Z","dependencies_parsed_at":"2023-03-02T12:45:47.220Z","dependency_job_id":null,"html_url":"https://github.com/longbridge/parser-benchmark","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"b450dc528db2fd1c6de146d0accb124e6c6ad6a8"},"previous_names":["longbridgeapp/stockcode-parser","longbridge/parser-benchmark","longbridgeapp/parser-benchmark"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longbridge%2Fparser-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longbridge%2Fparser-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longbridge%2Fparser-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longbridge%2Fparser-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longbridge","download_url":"https://codeload.github.com/longbridge/parser-benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240983000,"owners_count":19888604,"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":["nom","parser","peg","pest"],"created_at":"2025-01-10T04:13:15.286Z","updated_at":"2025-11-11T11:12:45.275Z","avatar_url":"https://github.com/longbridge.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parser benchmark\n\nThis is [Ticker symbol](https://en.wikipedia.org/wiki/Ticker_symbol) parse example to show how to write a parser in Go and Rust (Pest, Nom, rust-peg).\nAnd run benchmarks to compare the performance.\n\n## Parsers\n\n- [Pest](https://pest.rs)\n- [Nom](https://github.com/rust-bakery/nom)\n- [rust-peg](https://github.com/kevinmehall/rust-peg)\n- [pointlander/peg](https://github.com/pointlander/peg) - (Go)\n\n### Benchmark in Go\n\n```\nBenchmark_pointlander_peg-8       489860\t      2729 ns/op\nBenchmark_pointlander_peg-8    \t   64664\t     21624 ns/op\nBenchmark_pointlander_peg-8   \t    1910\t    589914 ns/op\n```\n\n### Benchmark in Rust\n\n```\npest_parse              time:   [1.6484 µs 1.6730 µs 1.7062 µs]\npest_parse_long         time:   [16.631 µs 16.912 µs 17.265 µs]\npest_parse_large        time:   [571.65 µs 590.45 µs 616.38 µs]\n\nnom_parse               time:   [420.42 ns 423.97 ns 428.22 ns]\nnom_parse_long          time:   [3.7042 µs 3.7315 µs 3.7676 µs]\nnom_parse_large         time:   [107.76 µs 109.42 µs 112.08 µs]\n\npeg_parse               time:   [1.0119 µs 1.0189 µs 1.0268 µs]\npeg_parse_long          time:   [9.7554 µs 9.9865 µs 10.388 µs]\npeg_parse_large         time:   [331.86 µs 342.67 µs 358.57 µs]\n```\n\n## Development in Go\n\nUse [https://github.com/pointlander/peg](https://github.com/pointlander/peg)\n\n```\ngo install github.com/pointlander/peg\n```\n\nAnd then run `make` to generate `grammar.peg` into `grammar.go`.\n\n\u003e NOTE: Please do not change `grammar.go`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongbridge%2Fparser-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongbridge%2Fparser-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongbridge%2Fparser-benchmark/lists"}