{"id":29639532,"url":"https://github.com/ryanleely/fastkv","last_synced_at":"2025-09-07T21:45:51.386Z","repository":{"id":56911136,"uuid":"144248182","full_name":"RyanLeeLY/FastKV","owner":"RyanLeeLY","description":"FastKV is a real-time and high-performance persistent key-value store implemented by mmap. FastKV是由mmap实现的一个高实时性、高性能key-value持久化存储组件。","archived":false,"fork":false,"pushed_at":"2019-09-12T02:39:31.000Z","size":113,"stargazers_count":182,"open_issues_count":0,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-21T21:00:23.802Z","etag":null,"topics":["ios","key-value","mmap","objective-c","store"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RyanLeeLY.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}},"created_at":"2018-08-10T06:50:20.000Z","updated_at":"2025-04-29T09:24:53.000Z","dependencies_parsed_at":"2022-08-20T20:20:43.548Z","dependency_job_id":null,"html_url":"https://github.com/RyanLeeLY/FastKV","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/RyanLeeLY/FastKV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLeeLY%2FFastKV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLeeLY%2FFastKV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLeeLY%2FFastKV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLeeLY%2FFastKV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyanLeeLY","download_url":"https://codeload.github.com/RyanLeeLY/FastKV/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanLeeLY%2FFastKV/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274101783,"owners_count":25222446,"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-09-07T02:00:09.463Z","response_time":67,"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":["ios","key-value","mmap","objective-c","store"],"created_at":"2025-07-21T20:38:05.456Z","updated_at":"2025-09-07T21:45:51.355Z","avatar_url":"https://github.com/RyanLeeLY.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastKV\n[![Platform](https://img.shields.io/cocoapods/p/TinyPart.svg?style=flat)](https://cocoapods.org/?q=tinypart)\n[![Version](https://img.shields.io/cocoapods/v/FastKV.svg?style=flat)](https://cocoapods.org/pods/FastKV)\n[![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/RyanLeeLY/TinyPart/blob/master/LICENSE)\n[![Gmail](https://img.shields.io/badge/Gmail-@liyaoxjtu2013-red.svg?style=flat)](mail://liyaoxjtu2013@gmail.com)\n[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/liyaoryan)\n\n[中文介绍](https://github.com/RyanLeeLY/FastKV/blob/master/iOS的高性能、高实时性key-value持久化组件.md)\n\n## Usage\n```\n[[FastKV defaultFastKV] setBool:YES forKey:@\"key\"];\n[[FastKV defaultFastKV] setInteger:1 forKey:@\"key\"];\n[[FastKV defaultFastKV] setObject:@\"value\" forKey:@\"key\"];\n\n[[FastKV defaultFastKV] boolForKey:@\"key\"];\n[[FastKV defaultFastKV] integerForKey:@\"key\"];\n[[FastKV defaultFastKV] objectOfClass:NSString.class forKey:@\"key\"];\n```\n\n## Memory Allocation\n`FastKV` provides two kinds of memory allocation strategy.\n\n```\ntypedef NS_ENUM(NSUInteger, FastKVMemoryStrategy) {\n    FastKVMemoryStrategyDefault = 0,\n    FastKVMemoryStrategy1,\n};\n```\n\n**Doubling** `FastKVMemoryStrategyDefault`\n\n```\nsize_t allocationSize = 1;\n    while (allocationSize \u003c= neededSize) {\n        allocationSize *= 2;\n    }\n    return allocationSize;\n```\n \n**Linear** `FastKVMemoryStrategy1 `\n\nReference [python list](https://svn.python.org/projects/python/trunk/Objects/listobject.c)\n\n```\nsize_t allocationSize = (neededSize \u003e\u003e 3) + (neededSize \u003c 9 ? 3 : 6);\nreturn allocationSize + neededSize;\n```\n\n## Installation\n\nFastKV is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'FastKV'\n```\n\n## Benchmark\niPhone 8 64G, iOS 11.4\n\n**Time taken of 10,000 write operations, unit: ms**\n\n![Benchmark](https://github.com/RyanLeeLY/FastKV/raw/master/benchmark.jpeg)\n\n\n## Author\n\nyao.li, liyaoxjtu2013@gmail.com\n\n## License\n\nFastKV is available under the [MIT](https://github.com/RyanLeeLY/FastKV/blob/master/LICENSE) license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanleely%2Ffastkv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanleely%2Ffastkv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanleely%2Ffastkv/lists"}