{"id":27185870,"url":"https://github.com/inv2004/newfix","last_synced_at":"2025-04-09T17:55:14.996Z","repository":{"id":53084827,"uuid":"350818878","full_name":"inv2004/newfix","owner":"inv2004","description":"Fix static-typed parser","archived":false,"fork":false,"pushed_at":"2021-04-09T23:59:36.000Z","size":687,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-05-03T15:13:41.491Z","etag":null,"topics":["benchmarks","financial","fix","parser","parsers","protocol"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/inv2004.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":"2021-03-23T18:36:35.000Z","updated_at":"2022-10-25T19:34:33.000Z","dependencies_parsed_at":"2022-09-12T12:30:17.906Z","dependency_job_id":null,"html_url":"https://github.com/inv2004/newfix","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fnewfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fnewfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fnewfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fnewfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inv2004","download_url":"https://codeload.github.com/inv2004/newfix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248083588,"owners_count":21045122,"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":["benchmarks","financial","fix","parser","parsers","protocol"],"created_at":"2025-04-09T17:55:14.498Z","updated_at":"2025-04-09T17:55:14.991Z","avatar_url":"https://github.com/inv2004.png","language":"Nim","readme":"# Fix static-typed parser\n\nThe parser generates effective structure and its parser from QuickFix's specs XML files\n\nThe xml's are pregenerated into packages inside the ``newfix`` package\n\n## Usage\n```nim\nimport newfix/fix44.nim  # For Full FIX44 specification, but better to optimize\n\nlet msg = \"8=FIX4.4....\" # Fix string\nlet fix = parseFix44(msg)\necho fix\n```\n\n## Benchmarks\n\nDuring the implementation, I was looking at the benchmark's numbers of CoralFIX Parser, which were mentioned like one of the fastest FIX parsers: http://www.coralblocks.com/index.php/coralfix-performance-numbers/ .\n\nThe article mentions hw: Intel i7 quad-core (4 x 3.50GHz) Ubuntu box overclocked to 4.50Ghz.\n\nMy hw: i5-7500 (4 x 3.40GHz) (not overclocked / win10)\n\n|  Test                                    | CoralFIX  | NewFix      | StreamFix   |\n|------------------------------------------|-----------|-------------|-------------|\n| Simple                                   | 481.55 ns | 315.7449 ns | 397.2781 ns |\n| Repeating groups                         | 1132 ns   | 581.9442 ns | 502.9431 ns |\n| Repeating groups inside repeating groups | 1932 ns   | 1045.8 ns   | 820.1095 ns |\n| MassQuote with 1x8 subgroups (314b) *    |           | 1570.5 ns   | 335.1315 ns |\n| MassQuote with 5x6 subgroups (1010b) *   |           | 6616.0 ns   | 1312.4 ns   |\n\n* MassQuote: StreamFix extracts MsgType, QuoteID, Bid/OfferSize and BidOfferSpotPrice (to build a book)\n\n## StreamFix\n\nhttps://github.com/inv2004/streamfix\n\nFix parser implementation without static garanties, but suitable to process streaming data from low-latency adapters without waiting for full message (not FPGA yet)\n\n## Optimization:\n\nTo optimize parsing speed it is better to remove unused fields from full specification like it have been done for ``spec/MINIMAL.xml' and PrimeXM specification in 'scpe/FIX44PXM.xml' already\n\n```bash\n$ nim c src/newfix/genfix.nim\n$ src/newfix/genfix spec/FIX44MY.xml \u003e fix44my.xml\n```\n\nStructure name from the top tags attributes: ``\u003cfix type='FIX' major='4' minor='4' servicepack='min'\u003e`` =\u003e ``Fix44Min``\n\nIf you know that you can optimize some types: for example hex or int instead of string - it possible to optimize separate fields manually in the generated module.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finv2004%2Fnewfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finv2004%2Fnewfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finv2004%2Fnewfix/lists"}