{"id":19212592,"url":"https://github.com/fasterthanlime/netherquote","last_synced_at":"2025-08-21T12:17:56.226Z","repository":{"id":66881723,"uuid":"469898073","full_name":"fasterthanlime/netherquote","owner":"fasterthanlime","description":"Repo to profile pathological compile times with knuffel / chumsky","archived":false,"fork":false,"pushed_at":"2022-03-14T20:42:41.000Z","size":8,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-20T17:40:35.055Z","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/fasterthanlime.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":"2022-03-14T20:42:28.000Z","updated_at":"2023-07-25T14:55:27.000Z","dependencies_parsed_at":"2023-02-27T21:45:48.782Z","dependency_job_id":null,"html_url":"https://github.com/fasterthanlime/netherquote","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/fasterthanlime%2Fnetherquote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasterthanlime%2Fnetherquote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasterthanlime%2Fnetherquote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasterthanlime%2Fnetherquote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fasterthanlime","download_url":"https://codeload.github.com/fasterthanlime/netherquote/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253817591,"owners_count":21969007,"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-11-09T13:47:25.987Z","updated_at":"2025-05-12T20:38:30.813Z","avatar_url":"https://github.com/fasterthanlime.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netherquote\n\nShowcase for pathological compile times when using knuffel / chumsky / VERY\nLARGE types.\n\n## How to reproduce\n\nThe rust toolchain version is pinned to 1.59.0 stable already,\n`.cargo/config.toml` defaults to lld but it probably doesn't make a big\ndifference here.\n\n`cargo run` finishes in reasonable time, but `cargo run --release` spends\na _long_ time in \"netherquote (bin)\".\n\ncargo timings don't show much, rustc self-profile shows a bunch of time spent in\nthin-LTO, I don't know how to go much deeper.\n\n```shell\n$ summarize summarize netherquote-867123.mm_profdata | less\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| Item                                            | Self time | % of total time | Time     | Item count |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| LLVM_passes                                     | 12.66s    | 24.018          | 12.69s   | 1          |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| finish_ongoing_codegen                          | 11.80s    | 22.376          | 11.80s   | 1          |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| LLVM_module_optimize                            | 8.90s     | 16.879          | 8.90s    | 17         |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| LLVM_thin_lto_import                            | 4.89s     | 9.274           | 4.89s    | 16         |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| LLVM_module_codegen_emit_obj                    | 4.71s     | 8.942           | 4.71s    | 17         |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| LLVM_lto_optimize                               | 4.55s     | 8.629           | 4.55s    | 16         |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| codegen_module_perform_lto                      | 1.40s     | 2.658           | 15.67s   | 16         |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| codegen_module                                  | 1.12s     | 2.125           | 1.38s    | 16         |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| codegen_module_optimize                         | 1.01s     | 1.921           | 9.91s    | 17         |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| run_linker                                      | 232.54ms  | 0.441           | 232.54ms | 1          |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| codegen_fulfill_obligation                      | 209.15ms  | 0.397           | 345.49ms | 2308       |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n| normalize_projection_ty                         | 201.78ms  | 0.383           | 206.45ms | 823        |\n+-------------------------------------------------+-----------+-----------------+----------+------------+\n```\n\n`cargo llvm-lines` show some multiple-pages-long types: these are generated by\none of [knuffel](https://crates.io/crates/knuffel)'s derive macro, which\nuses [chumsky](http://crates.io/crates/chumsky) under the hood.\n\nThese generate a frightening amount of LLVM IR lines, considering `config.rs` is\nbarely over a hundred lines:\n\n```shell\n$ cargo llvm-lines | less\n  Lines          Copies       Function name\n  -----          ------       -------------\n  322815 (100%)  7117 (100%)  (TOTAL)\n   38985 (12.1%)  107 (1.5%)  \u003cchumsky::combinator::Then\u003cA,B\u003e as chumsky::Parser\u003cI,(O,U)\u003e\u003e::parse_inner\n   21584 (6.7%)   331 (4.7%)  core::result::Result\u003cT,E\u003e::map\n   21132 (6.5%)    36 (0.5%)  \u003cchumsky::combinator::Or\u003cA,B\u003e as chumsky::Parser\u003cI,O\u003e\u003e::parse_inner\n   14220 (4.4%)   158 (2.2%)  \u003cchumsky::combinator::Map\u003cA,F,O\u003e as chumsky::Parser\u003cI,U\u003e\u003e::parse_inner\n   14148 (4.4%)   108 (1.5%)  \u003cchumsky::combinator::Or\u003cA,B\u003e as chumsky::Parser\u003cI,O\u003e\u003e::parse_inner::zip_with\n   12336 (3.8%)    48 (0.7%)  \u003cchumsky::combinator::Repeated\u003cA\u003e as chumsky::Parser\u003cI,alloc::vec::Vec\u003cO\u003e\u003e\u003e::parse_inner::{{closure}}\n   10154 (3.1%)   158 (2.2%)  \u003cchumsky::combinator::Map\u003cA,F,O\u003e as chumsky::Parser\u003cI,U\u003e\u003e::parse_inner::{{closure}}\n    6944 (2.2%)    14 (0.2%)  \u003cchumsky::primitive::Choice\u003c(X_,Y_,Z_),E\u003e as chumsky::Parser\u003cI,O\u003e\u003e::parse_inner\n    6664 (2.1%)   180 (2.5%)  \u003cchumsky::combinator::Or\u003cA,B\u003e as chumsky::Parser\u003cI,O\u003e\u003e::parse_inner::{{closure}}\n    5634 (1.7%)   112 (1.6%)  chumsky::stream::Stream\u003cI,S\u003e::attempt\n    4680 (1.4%)    78 (1.1%)  chumsky::stream::Stream\u003cI,S\u003e::try_parse::{{closure}}\n    4440 (1.4%)    24 (0.3%)  \u003cchumsky::combinator::Repeated\u003cA\u003e as chumsky::Parser\u003cI,alloc::vec::Vec\u003cO\u003e\u003e\u003e::parse_inner\n    3807 (1.2%)   253 (3.6%)  \u003cchumsky::debug::Silent as chumsky::debug::Debugger\u003e::invoke\n    3777 (1.2%)   251 (3.5%)  \u003cchumsky::debug::Verbose as chumsky::debug::Debugger\u003e::invoke\n    3272 (1.0%)    14 (0.2%)  \u003cchumsky::primitive::Filter\u003cF,E\u003e as chumsky::Parser\u003cI,I\u003e\u003e::parse_inner\n```\n\nThis might have more to do with codegen + LLVM and less with \"making rustc data\nstructures / algorithms\" more efficient, you be the judge!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasterthanlime%2Fnetherquote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffasterthanlime%2Fnetherquote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasterthanlime%2Fnetherquote/lists"}