{"id":13732240,"url":"https://github.com/graphitemaster/lua-vec","last_synced_at":"2026-01-18T21:03:32.762Z","repository":{"id":142016517,"uuid":"167674878","full_name":"graphitemaster/lua-vec","owner":"graphitemaster","description":"highly efficent, caching, copy-on-write lua vector math library","archived":false,"fork":false,"pushed_at":"2019-01-26T10:16:00.000Z","size":2,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T20:13:52.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/graphitemaster.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}},"created_at":"2019-01-26T10:07:54.000Z","updated_at":"2023-09-23T21:42:40.000Z","dependencies_parsed_at":"2023-07-07T07:32:49.095Z","dependency_job_id":null,"html_url":"https://github.com/graphitemaster/lua-vec","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/graphitemaster%2Flua-vec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphitemaster%2Flua-vec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphitemaster%2Flua-vec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphitemaster%2Flua-vec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphitemaster","download_url":"https://codeload.github.com/graphitemaster/lua-vec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213757425,"owners_count":15634176,"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-08-03T02:01:50.123Z","updated_at":"2026-01-18T21:03:32.756Z","avatar_url":"https://github.com/graphitemaster.png","language":"Lua","readme":"# lua-vec\n\nTable constructions in Lua are expensive, creating and destroying\nthousands of \"vector\" tables frame to frame in an engine can cause\nserious performance problems when Lua's GC is triggered; this is a\nvector library that attempts to solve this problem by interning\nconstruction and reusing references\n\nIt's not safe to modify a vector that may be referenced multiple times\nso this library also implements reasonably efficent read-only data types\nthrough the use of `__index` metamethods.\n\n## performance\n\nconstruction cost in the uncached case is ~2x more expensive but\nthe same in the cached case, the real winnings comes from not having a\ndestruction phase ever occur, e.g seeing 60% of GC frame to frame occur\nbecause of one-off vector constructions go away is quite significant,\nvector comparisons are ~20x faster since it's just object identity, i.e\npointer comparison in the VM.\n\n## memory\n\nperformance is made up by interning so if you're not careful you can\nrun out of memory rather quickly, make smart decisions when to call\n`clear_cache()` on each of the vector caches.\n","funding_links":[],"categories":["Scripting"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphitemaster%2Flua-vec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphitemaster%2Flua-vec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphitemaster%2Flua-vec/lists"}