{"id":18579036,"url":"https://github.com/lpeterse/lmp","last_synced_at":"2025-05-16T02:12:46.328Z","repository":{"id":66327455,"uuid":"179370781","full_name":"lpeterse/lmp","owner":"lpeterse","description":"Lars' multiprecision integer library","archived":false,"fork":false,"pushed_at":"2019-05-10T15:45:14.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T15:51:40.413Z","etag":null,"topics":["bsdnt","c","ghc","gmp","low-level","performance"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpeterse.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":"2019-04-03T21:09:21.000Z","updated_at":"2019-05-07T22:03:47.000Z","dependencies_parsed_at":"2023-03-10T23:49:53.155Z","dependency_job_id":null,"html_url":"https://github.com/lpeterse/lmp","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/lpeterse%2Flmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpeterse%2Flmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpeterse%2Flmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpeterse%2Flmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpeterse","download_url":"https://codeload.github.com/lpeterse/lmp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453625,"owners_count":22073618,"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":["bsdnt","c","ghc","gmp","low-level","performance"],"created_at":"2024-11-06T23:38:44.444Z","updated_at":"2025-05-16T02:12:46.306Z","avatar_url":"https://github.com/lpeterse.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lmp\n\n`lmp` is a BSD licensed multiprecision integer library.\n\n## Purpose\n\nThis library is an experiment towards offering an alternative large integer implementation for\nthe [Glasgow Haskell Compiler](https://gitlab.haskell.org/ghc/ghc).\n\nSee [replacing-gmp-notes](https://gitlab.haskell.org/ghc/ghc/wikis/replacing-gmp-notes)\nfor more motivation behind replacing GMP.\n\n## Design\n\n### Completeness over premature optimization\n\nGetting a working prototype which implements all functions required by GHC is the primary goal.\n\n### No assembly (if possible)\n\nThe code shall be compliant C99. Compiler intrinsics may be used if supported by both clang and\ngcc and their use yields a significant benefit. Compiler intrinsics shall be used in favour of\nswitching to assembly language as they maintain architecture independence even if not compiling\nto efficient primitives on all architectures. Having a single code path executed and tested on\nall architectures also reduces maintenance burden and the likelyhood of architecture specific bugs.\n\n### Performance\n\nPerformance is nice, but not a primary goal for now. It would be hybris to try to compete with GMP.\nIt is considered good enough to stay in the same algorithmic complexity classes and stay within the\nsame order of magnitude wrt to performance.\n\nC compilers are incredibly smart these days. It shall be assumed that this library is used with\nrecent compiler versions and optimisations turned on.\n\n### Architecture specific extendsions (AVX, SSE etc)\n\nSome extensions have the potential for massive perfomance gains, but they are not available on\nall CPUs.\n\nThis topic may be explored in a second step unless it's a low hanging fruit (auto-vectorization).\n\n### Memory allocation and interfacing with GHC\n\nOne notable point is that ....\n\n## License\n\nBSD3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpeterse%2Flmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpeterse%2Flmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpeterse%2Flmp/lists"}