{"id":15492305,"url":"https://github.com/stranger6667/article-linked-lists","last_synced_at":"2025-08-19T00:19:45.657Z","repository":{"id":239617226,"uuid":"795968439","full_name":"Stranger6667/article-linked-lists","owner":"Stranger6667","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-14T21:52:07.000Z","size":33,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T19:52:18.824Z","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":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stranger6667.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":"2024-05-04T14:41:00.000Z","updated_at":"2024-06-07T07:53:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"accf41ee-3092-4e94-991f-ba3b70456186","html_url":"https://github.com/Stranger6667/article-linked-lists","commit_stats":null,"previous_names":["stranger6667/article-linked-lists"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Stranger6667/article-linked-lists","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Farticle-linked-lists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Farticle-linked-lists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Farticle-linked-lists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Farticle-linked-lists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stranger6667","download_url":"https://codeload.github.com/Stranger6667/article-linked-lists/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Farticle-linked-lists/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271079228,"owners_count":24695597,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-02T08:00:16.853Z","updated_at":"2025-08-19T00:19:45.634Z","avatar_url":"https://github.com/Stranger6667.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blazingly Fast Linked Lists\n\nThis repository contains a toy validation library built in the [Blazingly Fast Linked Lists](https://dygalo.dev/blog/blazingly-fast-linked-lists/) article.\n\n## Usage\n\n```rust\nuse serde_json::json;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    jsonschema::validate(\n      // JSON instance to validate\n      \u0026json!({\n          \"name\": \"John\",\n          \"location\": {\n               \"country\": 404\n          }\n      }),\n      // JSON schema\n      \u0026json!({\n          \"properties\": {\n              \"name\": {\n                  \"type\": \"string\"\n              },\n              \"location\": {\n                  \"properties\": {\n                      \"country\": {\n                          \"type\": \"string\"\n                      }\n                  }\n              }\n          }\n      }),\n    ).expect_err(\"Should fail\");\n    Ok(())\n}\n// 404 is not of type ‘string’ at /location/country\n```\n\n**NOTE**: To keep the article focused on path tracking, this library uses a single hardcoded schema.\n\nRun benchmarks:\n\n```sh\ncargo bench\n```\n\nBuild flame graph for the \"valid/10 levels\" benchmark:\n\n```sh\ncargo flamegraph --bench jsonschema -o valid-10.svg -- --bench \"valid/10 levels\"\n```\n\n## Benchmarks\n\n![performance-comparison](https://github.com/Stranger6667/article-linked-lists/assets/1236561/33231458-94a0-4f8a-bb21-b24ab4852dcb)\n\nHere is the performance progression described in the article:\n\n| Iteration       | Commit                                                                                                          | valid 0           | valid 5             | valid 10            | invalid 0          | invalid 5           | invalid 10          |\n| --------------- | --------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------- | ------------------- | ------------------ | ------------------- | ------------------- |\n| No tracking     | [a030dcb](https://github.com/Stranger6667/article-linked-lists/commit/a030dcb18448555efa1a8f63f8b5ccebef7d2f59) |            36.3 µs |             553.8 µs |            1.11 ms |            475.2 µs |               914.8 µs |              1.48 ms |\n| Naive           | [9ef7b4c](https://github.com/Stranger6667/article-linked-lists/commit/9ef7b4c56c8ca2ba3dcd15681daff6951aa64c2c) | 40.9 µs (**+12.0%**) |   2.61 ms (**+369.4%**) | 6.69 ms (**+499.6%**) | 961.2 µs (**+100.8%**) | 4.11 ms (**+346.8%**) | 9.07 ms (**+502.7%**) |\n| `\u0026mut Vec`      | [7c94736](https://github.com/Stranger6667/article-linked-lists/commit/7c9473689bf24b90c8e0c45f700ad985b536a73e) | 40.2 µs (**-13.1%**) | 1.24 ms (**-46.0%**) | 2.46 ms (**-62.3%**) | 951.7 µs (**+3.0%**) | 2.39 ms (**-42.2%**) | 4.16 ms (**-57.8%**) |\n| Linked list     | [91ec92c](https://github.com/Stranger6667/article-linked-lists/commit/91ec92c757d3948a2a032a55d035e6fadc63fdcf) | 35.0 µs (**-14.8%**) |  663.5 µs (**-46.4%**) | 1.32 ms (**-46.6%**) | 958.9 µs (**+1.8%**) | 2.54 ms (**+5.1%**) | 4.58 ms (**+9.9%**) |\n| Tune capacity   | [10ae4f1](https://github.com/Stranger6667/article-linked-lists/commit/10ae4f100935c757bb7707defcf122c179aee2dc) | 39.1 µs (**+11.2%**) |  667.9 µs (**+0.5%**) | 1.30 ms (**-1.7%**) | 899.7 µs (**-7.5%**) | 1.96 ms (**-23.3%**) | 3.49 ms (**-24.3%**) |\n| Single `Vec`    | [d3d2182](https://github.com/Stranger6667/article-linked-lists/commit/d3d2182e00aba996134475b90e87d565dfe47ac3) | 39.3 µs (**-0.2%**) |  652.3 µs (**-2.7%**) | 1.35 ms (**+2.2%**) | 765.1 µs (**-14.2%**) | 1.83 ms (**-6.9%**) | 3.33 ms (**-5.9%**) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstranger6667%2Farticle-linked-lists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstranger6667%2Farticle-linked-lists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstranger6667%2Farticle-linked-lists/lists"}