{"id":34230703,"url":"https://github.com/edwinsyarief/teishoku","last_synced_at":"2026-03-13T19:06:50.064Z","repository":{"id":316218430,"uuid":"1062465259","full_name":"edwinsyarief/teishoku","owner":"edwinsyarief","description":"High-performance, archetype-based, and easy-to-use Entity Component System (ECS) library for Go.","archived":false,"fork":false,"pushed_at":"2025-12-22T08:40:46.000Z","size":382,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T07:33:43.655Z","etag":null,"topics":["archetype","archetype-golang","architecture","ecs","game-development","gamedev","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/edwinsyarief.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-23T09:41:08.000Z","updated_at":"2025-12-22T07:00:21.000Z","dependencies_parsed_at":"2025-10-16T11:15:31.896Z","dependency_job_id":"03eb50b1-eb11-4672-87a9-9f4d2688e88b","html_url":"https://github.com/edwinsyarief/teishoku","commit_stats":null,"previous_names":["edwinsyarief/lazyecs","edwinsyarief/teishoku"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/edwinsyarief/teishoku","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwinsyarief%2Fteishoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwinsyarief%2Fteishoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwinsyarief%2Fteishoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwinsyarief%2Fteishoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edwinsyarief","download_url":"https://codeload.github.com/edwinsyarief/teishoku/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwinsyarief%2Fteishoku/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30472989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["archetype","archetype-golang","architecture","ecs","game-development","gamedev","go","golang"],"created_at":"2025-12-16T01:04:25.152Z","updated_at":"2026-03-13T19:06:50.056Z","avatar_url":"https://github.com/edwinsyarief.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Teishoku ECS\n\n![Go Version](https://img.shields.io/badge/Go-1.25.1-blue?logo=go\u0026style=flat\u0026logoColor=white)\n![Go Reference](https://pkg.go.dev/badge/github.com/edwinsyarief/teishoku.svg)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/edwinsyarief/teishoku/test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/edwinsyarief/teishoku)](https://goreportcard.com/report/github.com/edwinsyarief/teishoku)\n\n`Teishoku` is a high-performance, archetype-based, and easy-to-use Entity Component System (ECS) library for Go.\n\nIt is designed for performance-critical applications like games and simulations, offering a simple, generic API that emphasizes **zero-allocation performance** on the hot path. By storing entities with the same component layout in contiguous memory blocks (archetypes), `Teishoku` enables extremely fast, cache-friendly iteration.\n\n## Features\n\n- **Archetype-Based**: Maximizes cache efficiency by grouping entities with identical component sets.\n- **Generic API**: Leverages Go generics for a clean, type-safe, and intuitive developer experience.\n- **Zero-Allocation Hot Path**: Entity creation, querying, and component access are optimized for speed with minimal GC overhead.\n- **Simple and Clean**: Designed to be easy to learn and integrate into any project.\n\n## When to use Teishoku\n\n`Teishoku` is ideal for projects where performance is critical and you need to manage a large number of objects with varying properties. Common use cases include:\n\n-   Game development (e.g., managing game objects, characters, and particles).\n-   High-performance simulations.\n-   Real-time systems that require predictable performance and low latency.\n\n## How It Works\n\n`Teishoku` is built around a few core concepts that work together to provide a high-performance and ergonomic experience.\n\n### World, Entity, and Component\n\n-   **World**: The central container that manages all entities, components, and game state. All ECS operations happen within a `World`. It also includes a `Resources` map for storing global, singleton-like data.\n-   **Entity**: A simple integer that uniquely identifies an object in your application. It doesn't hold any data itself but serves as a key to associate a group of components.\n-   **Component**: A plain Go struct that stores data (e.g., `Position`, `Velocity`). Components should contain only data and no logic.\n\n### Archetypes and Performance\n\nThe key to `teishoku`'s performance is its **archetype-based architecture**.\n\nAn **archetype** is a unique combination of component types. For example, all entities that have _only_ a `Position` and a `Velocity` component belong to the same archetype.\n\nInside an archetype, all components are stored in tightly packed, contiguous arrays. This means all `Position` components are next to each other in memory, and all `Velocity` components are also next to each other. When a `Filter` iterates over entities, it can access their component data in a linear, cache-friendly manner, which is extremely fast.\n\nWhen you add or remove a component from an entity, the entity is moved from its old archetype to a new one that matches its new set of components. While this operation is efficient, it is slower than creating entities with a fixed layout using a `Builder`.\n\n## Getting Started\n\nThis guide covers the primary workflow for setting up and using `Teishoku`.\n\n### 1. Installation\n\nAdd `Teishoku` as a dependency to your project:\n\n```bash\ngo get github.com/edwinsyarief/teishoku\n```\n\n### 2. A Complete Example\n\nHere is a complete, runnable example that demonstrates the core features:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/edwinsyarief/teishoku\"\n)\n\n// 1. Define Components\n// Components are simple Go structs that hold data.\n\ntype Position struct {\n\tX, Y float32\n}\n\ntype Velocity struct {\n\tVX, VY float32\n}\n\nfunc main() {\n\t// 2. Create a World\n\t// The World is the container for all your entities and components.\n\tworld := teishoku.NewWorld(10000)\n\n\t// 3. Create Entities with a Builder\n\t// A Builder is the most efficient way to create entities with a\n\t// predefined set of components.\n\tbuilder := teishoku.NewBuilder2[Position, Velocity](\u0026world)\n\n\t// Create 100 entities in a batch.\n\tbuilder.NewEntities(100)\n\n\t// 4. Initialize Components with a Filter\n\t// Use a Filter (or \"query\") to iterate over entities and initialize them.\n\tinitQuery := teishoku.NewFilter2[Position, Velocity](\u0026world)\n\ti := 0\n\tfor initQuery.Next() {\n\t\tpos, vel := initQuery.Get()\n\t\tpos.X = float32(i) * 2.0\n\t\tpos.Y = 0\n\t\tvel.VX = 1.0\n\t\tvel.VY = 0.5\n\t\ti++\n\t}\n\n\t// 5. Create a System to Update Entities\n\t// A system is a loop that uses a Filter to update component data.\n\tmovementSystem := teishoku.NewFilter2[Position, Velocity](\u0026world)\n\tfor i := 0; i \u003c 5; i++ { // Simulate 5 frames\n\t\t// When reusing a filter, you must call Reset() before each iteration.\n\t\tmovementSystem.Reset()\n\t\tfor movementSystem.Next() {\n\t\t\tpos, vel := movementSystem.Get()\n\t\t\tpos.X += vel.VX\n\t\t\tpos.Y += vel.VY\n\t\t}\n\t}\n    \n    // 6. Verify the result (optional)\n    resultQuery := teishoku.NewFilter2[Position, Velocity](\u0026world)\n    allEntities := resultQuery.Entities()\n    if len(allEntities) \u003e 10 {\n        entityToInspect := allEntities[10]\n        finalPos := teishoku.GetComponent[Position](\u0026world, entityToInspect)\n        fmt.Printf(\"Entity 10's final position: %+v\\n\", *finalPos)\n    }\n}\n```\n\n## Code Generation\n\n`Teishoku` uses Go's `go generate` tool to create boilerplate code for multi-component `Builders`, `Filters`, and `World` API functions (e.g., `NewBuilder3`, `Filter4`, `GetComponent2`). This approach keeps the library's public API clean and consistent without requiring developers to write repetitive code manually.\n\nTo run the code generator, simply execute the following command from the root of the repository:\n\n```bash\ngo generate ./...\n```\n\nThis will regenerate the `*_generated.go` files. You should run this command whenever you change the templates in the `templates/` directory.\n\n## API Reference\n\nThe following tables provide a summary of the core API. For complete and up-to-date documentation, please refer to the **GoDoc comments in the source code**, which serve as the official API reference.\n\n### World\n\n| Function                            | Description                                                       |\n| ----------------------------------- | ----------------------------------------------------------------- |\n| `NewWorld(capacity int) *World`     | Creates a new `World` with a pre-allocated entity capacity.       |\n| `(w *World) RemoveEntity(e Entity)` | Deactivates an entity and recycles its ID for future use.         |\n| `(w *World) IsValid(e Entity) bool` | Checks if an entity reference is still valid (i.e., not deleted). |\n| `(w *World).Resources() *Resources` | Retrieves the `Resources` manager for storing global data.        |\n\n### Component Management\n\nFunctions are provided for up to 6 components (`GetComponent`, `GetComponent2`, etc.).\n\n| Function                                     | Description                                                          |\n| -------------------------------------------- | -------------------------------------------------------------------- |\n| `GetComponent[T](w *World, e Entity) *T`     | Retrieves a pointer to a single component `T` for an entity.         |\n| `SetComponent[T](w *World, e Entity, val T)` | Adds or updates a component. May move the entity to a new archetype. |\n| `RemoveComponent[T](w *World, e Entity)`     | Removes a component. May move the entity to a new archetype.         |\n\n### Builders (Entity Creation)\n\nBuilders are available for creating entities with 1 to 6 components (`NewBuilder`, `NewBuilder2`, etc.).\n\n| Function                                       | Description                                                             |\n| ---------------------------------------------- | ----------------------------------------------------------------------- |\n| `NewBuilder[T](w *World) *Builder[T]`          | Creates a `Builder` for entities with a specific set of components.     |\n| `(b *Builder[T]) NewEntity() Entity`           | Creates a single new entity with the pre-configured components.         |\n| `(b *Builder[T]) NewEntities(count int)`       | Creates a batch of `count` entities with the pre-configured components. |\n| `(b *Builder[T]) Get(e Entity) *T`             | Gets the component(s) for an entity created by this builder.            |\n| `(b *Builder[T]) Set(e Entity, comp T)`        | Sets the component(s) for an entity.                                    |\n| `(b *Builder[T]) SetBatch(e []Entity, comp T)` | Sets the component(s) for entities.                                     |\n\n### Filters (Querying)\n\nFilters are available for iterating over entities with 1 to 6 components (`NewFilter`, `NewFilter2`, etc.).\n\n| Function                             | Description                                                                 |\n| ------------------------------------ | --------------------------------------------------------------------------- |\n| `NewFilter[T](w *World) *Filter[T]`  | Creates a `Filter` to iterate over entities with a set of components.       |\n| `(f *Filter[T]) Next() bool`         | Advances the iterator to the next entity. Returns `false` if none are left. |\n| `(f *Filter[T]) Entity() Entity`     | Returns the current `Entity` in the iteration.                              |\n| `(f *Filter[T]) Get() *T`            | Returns the component(s) for the current entity.                            |\n| `(f *Filter[T]) Reset()`             | Resets the iterator to the beginning.                                       |\n| `(f *Filter[T]) RemoveEntities()`    | Efficiently removes all entities matching the filter.                       |\n| `(f *Filter[T]) Entities() []Entity` | Returns the entities matching the filter.                                   |\n\n### EventBus\n\n| Function                                           | Description                                          |\n| -------------------------------------------------- | ---------------------------------------------------- |\n| `Subscribe[T any](bus *EventBus, handler func(T))` | Registers a handler for events of type T.            |\n| `Publish[T any](bus *EventBus, event T)`           | Sends an event of type T to all subscribed handlers. |\n\n### Resources\n\n| Function                                       | Description                                    |\n| ---------------------------------------------- | ---------------------------------------------- |\n| `(r *Resources) Add(res any) int`              | Adds a resource and returns its ID.            |\n| `(r *Resources) Has(id int) bool`              | Checks if a resource with the given ID exists. |\n| `(r *Resources) Get(id int) any`               | Retrieves the resource by ID.                  |\n| `(r *Resources) Remove(id int)`                | Removes the resource by ID.                    |\n| `(r *Resources) Clear()`                       | Removes all resources.                         |\n| `HasResource[T any](r *Resources) (bool, int)` | Checks if a resource of type T exists.         |\n| `GetResource[T any](r *Resources) (*T, int)`   | Retrieves the resource of type T.              |\n\n## Concurrency\n\nThe `World` object and the `Resources` manager are thread-safe. However, the `EventBus` is **not** thread-safe and should not be accessed from multiple goroutines concurrently without external synchronization.\n\n## Benchmark Results\n\nThe following tables summarize the performance of `teishoku` across a range of common operations. The results are presented in nanoseconds (ns) and were run on an AMD EPYC 7763 64-Core Processor. For batch operations, the `ns/op` is presented on a per-entity basis.\n\nNotably, many core operations like creating entities, accessing components, and iterating with filters show **zero memory allocations** (`0 allocs/op`), making `teishoku` ideal for performance-critical applications where garbage collection pressure is a concern.\n\n### Entity Benchmark\n\n*Notes: ns/op is per-entity*\n\n| Action Name | Entities | ns/op | B/op | allocs/op |\n| :--- | :--- | :--- | :--- | :--- |\n| **Create World** | 1K | 9.917 | 49848 | 13 |\n| | 10K | 7.049 | 381626 | 13 |\n| | 100K | 6.298 | 3617473 | 13 |\n| | 1M | 4.370 | 36025028 | 13 |\n| **Auto Expand** | 1K | 54.435 | 143384 | 7 |\n| | 10K | 58.295 | 1269786 | 7 |\n| | 100K | 45.259 | 13508661 | 7 |\n| | 1M | 40.643 | 134651935 | 7 |\n| **World: Create Entity** | 1K | 40.366 | 0 | 0 |\n| | 10K | 35.297 | 0 | 0 |\n| | 100K | 35.366 | 0 | 0 |\n| | 1M | 33.623 | 0 | 0 |\n| **World: Create Entities (Batch)** | 1K | 3.009 | 0 | 0 |\n| | 10K | 2.632 | 0 | 0 |\n| | 100K | 2.341 | 0 | 0 |\n| | 1M | 2.462 | 0 | 0 |\n| **Builder: New Entity** | 1K | 18.620 | 0 | 0 |\n| | 10K | 17.874 | 2 | 0 |\n| | 100K | 15.588 | 12 | 0 |\n| | 1M | 14.534 | 0 | 0 |\n| **Builder: New Entities (Batch)** | 1K | 2.889 | 0 | 0 |\n| | 10K | 2.721 | 0 | 0 |\n| | 100K | 2.833 | 0 | 0 |\n| | 1M | 2.449 | 0 | 0 |\n| **Builder: New Entities w/ Value Set (Batch)** | 1K | 4.724 | 0 | 0 |\n| | 10K | 4.807 | 1 | 0 |\n| | 100K | 4.422 | 0 | 0 |\n| | 1M | 4.118 | 0 | 0 |\n| **Builder: New Entities w/ Value Set 2 (Batch)** | 1K | 6.408 | 0 | 0 |\n| | 10K | 6.516 | 1 | 0 |\n| | 100K | 6.707 | 12 | 0 |\n| | 1M | 5.527 | 0 | 0 |\n| **Builder: Set Component** | 1K | 57.795 | 0 | 0 |\n| | 10K | 56.678 | 0 | 0 |\n| | 100K | 55.559 | 10 | 0 |\n| | 1M | 53.948 | 0 | 0 |\n| **Builder: Set Component 2** | 1K | 67.170 | 0 | 0 |\n| | 10K | 66.665 | 3 | 0 |\n| | 100K | 63.926 | 0 | 0 |\n| | 1M | 63.424 | 0 | 0 |\n| **Builder: Get Component** | 1K | 8.424 | 0 | 0 |\n| | 10K | 8.543 | 0 | 0 |\n| **Filter \u0026 Iterate** | 1K | 0.953 | 0 | 0 |\n| | 10K | 0.936 | 0 | 0 |\n| | 100K | 0.933 | 0 | 0 |\n| | 1M | 0.935 | 0 | 0 |\n| **Filter \u0026 Iterate (2 components)** | 1K | 0.955 | 0 | 0 |\n| | 10K | 0.936 | 0 | 0 |\n| | 100K | 0.933 | 0 | 0 |\n| | 1M | 0.934 | 0 | 0 |\n| **Filter \u0026 Iterate (3 components)** | 1K | 0.975 | 0 | 0 |\n| | 10K | 0.939 | 0 | 0 |\n| | 100K | 0.935 | 0 | 0 |\n| | 1M | 0.936 | 0 | 0 |\n| **Filter \u0026 Iterate (4 components)** | 1K | 0.954 | 0 | 0 |\n| | 10K | 0.936 | 0 | 0 |\n| | 100K | 0.936 | 0 | 0 |\n| | 1M | 0.935 | 0 | 0 |\n| **Filter \u0026 Iterate (5 components)** | 1K | 0.953 | 0 | 0 |\n| | 10K | 0.936 | 0 | 0 |\n| | 100K | 0.935 | 0 | 0 |\n| | 1M | 0.934 | 0 | 0 |\n| **Filter \u0026 Iterate (6 components)** | 1K | 0.953 | 0 | 0 |\n| | 10K | 0.936 | 0 | 0 |\n| | 100K | 0.935 | 0 | 0 |\n| | 1M | 0.934 | 0 | 0 |\n| **Filter: Get Entities (Cached)** | 1K | 7.512 | 0 | 0 |\n| | 10K | 7.507 | 0 | 0 |\n| | 100K | 7.514 | 0 | 0 |\n| | 1M | 7.501 | 0 | 0 |\n| **Filter: Get Entities (Uncached)** | 1K | 411.3 | 0 | 0 |\n| | 10K | 2416 | 0 | 0 |\n| | 100K | 34316 | 0 | 0 |\n| | 1M | 384441 | 0 | 0 |\n| **Functions: Set Component (Existing)** | 1K | 96.09 | 0 | 0 |\n| | 10K | 96.52 | 0 | 0 |\n| | 100K | 99.31 | 0 | 0 |\n| | 1M | 100.6 | 0 | 0 |\n| **Functions: Set Component (New)** | 1K | 161.205 | 0 | 0 |\n| | 10K | 169.717 | 0 | 0 |\n| | 100K | 156.848 | 0 | 0 |\n| | 1M | 156.759 | 0 | 0 |\n| **Functions: Remove Component** | 1K | 162.390 | 0 | 0 |\n| | 10K | 169.940 | 0 | 0 |\n| | 100K | 158.516 | 0 | 0 |\n| | 1M | 157.510 | 0 | 0 |\n| **World: Remove Entity** | 1K | 68.376 | 0 | 0 |\n| | 10K | 79.215 | 1 | 0 |\n| | 100K | 80.864 | 1 | 0 |\n| | 1M | 99.023 | 0 | 0 |\n| **World: Remove Entities (Batch)** | 1K | 68.483 | 0 | 0 |\n| | 10K | 81.170 | 1 | 0 |\n| | 100K | 72.851 | 0 | 0 |\n| | 1M | 68.656 | 0 | 0 |\n| **World: Clear Entities** | 1K | 3.601 | 0 | 0 |\n| | 10K | 3.424 | 0 | 0 |\n| | 100K | 4.822 | 0 | 0 |\n| | 1M | 5.119 | 0 | 0 |\n\n### Event Bus Benchmark\n\n| Action Name | Handlers | ns/op | B/op | allocs/op |\n| :--- | :--- | :--- | :--- | :--- |\n| **Subscribe** | 1K | 0.0000533 | 0 | 0 |\n| | 10K | 0.0002618 | 0 | 0 |\n| | 100K | 0.005772 | 0 | 0 |\n| | 1M | 0.06385 | 0 | 0 |\n| **Publish (No Handlers)** | 1K | 0.0000088 | 0 | 0 |\n| | 10K | 0.0000961 | 0 | 0 |\n| | 100K | 0.0009734 | 0 | 0 |\n| | 1M | 0.008387 | 0 | 0 |\n| **Publish (One Handler)** | 1K | 0.0000271 | 0 | 0 |\n| | 10K | 0.0001824 | 0 | 0 |\n| | 100K | 0.001911 | 0 | 0 |\n| | 1M | 0.01867 | 0 | 0 |\n| **Publish (Many Handlers)** | 1K | 1890 | 0 | 0 |\n| | 10K | 18697 | 0 | 0 |\n| | 100K | 188506 | 0 | 0 |\n| | 1M | 1897631 | 0 | 0 |\n\n### Resources Benchmark\n\n| Action Name | Resources | ns/op | B/op | allocs/op |\n| :--- | :--- | :--- | :--- | :--- |\n| **Add** | 1K | 0.0001176 | 0 | 0 |\n| | 10K | 0.001122 | 0 | 0 |\n| | 100K | 0.01192 | 0 | 0 |\n| | 1M | 0.2008 | 0 | 0 |\n| **Has** | 1K | 0.0000100 | 0 | 0 |\n| | 10K | 0.0000609 | 0 | 0 |\n| | 100K | 0.0005573 | 0 | 0 |\n| | 1M | 0.005779 | 0 | 0 |\n| **Get** | 1K | 0.0000065 | 0 | 0 |\n| | 10K | 0.0000739 | 0 | 0 |\n| | 100K | 0.0006336 | 0 | 0 |\n| | 1M | 0.006237 | 0 | 0 |\n| **Remove** | 1K | 0.0000697 | 0 | 0 |\n| | 10K | 0.0005709 | 0 | 0 |\n| | 100K | 0.006688 | 0 | 0 |\n| | 1M | 0.1681 | 0 | 0 |\n| **Clear** | 1K | 15769 | 0 | 0 |\n| | 10K | 141010 | 0 | 0 |\n| | 100K | 1386929 | 0 | 0 |\n| | 1M | 23580516 | 0 | 0 |\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view raw benchmark output\u003c/summary\u003e\n\n```plaintext\ngoos: linux\ngoarch: amd64\npkg: github.com/edwinsyarief/teishoku\ncpu: AMD EPYC 7763 64-Core Processor\nBenchmarkCreateWorld/1K-4                      113096          9917 ns/op        49848 B/op          13 allocs/op\nBenchmarkCreateWorld/10K-4                      16908         70488 ns/op       381626 B/op          13 allocs/op\nBenchmarkCreateWorld/100K-4                      2374        629840 ns/op      3617473 B/op          13 allocs/op\nBenchmarkCreateWorld/1M-4                         272       4369555 ns/op     36025028 B/op          13 allocs/op\nBenchmarkAutoExpand/1K_init_x2-4                22147         54435 ns/op       143384 B/op           7 allocs/op\nBenchmarkAutoExpand/10K_init_x2-4                2034        582947 ns/op      1269786 B/op           7 allocs/op\nBenchmarkAutoExpand/100K_init_x2-4                241       4525902 ns/op     13508661 B/op           7 allocs/op\nBenchmarkAutoExpand/1000K_init_x2-4                25      40643101 ns/op    134651935 B/op           7 allocs/op\nBenchmarkWorldCreateEntity/1K-4                 29593         40366 ns/op            0 B/op           0 allocs/op\nBenchmarkWorldCreateEntity/10K-4                 3470        352969 ns/op            0 B/op           0 allocs/op\nBenchmarkWorldCreateEntity/100K-4                 352       3536612 ns/op            0 B/op           0 allocs/op\nBenchmarkWorldCreateEntity/1M-4                    36      33623122 ns/op            0 B/op           0 allocs/op\nBenchmarkWorldCreateEntities/1K-4              397861          3009 ns/op            0 B/op           0 allocs/op\nBenchmarkWorldCreateEntities/10K-4              45781         26321 ns/op            0 B/op           0 allocs/op\nBenchmarkWorldCreateEntities/100K-4              5116        234125 ns/op            0 B/op           0 allocs/op\nBenchmarkWorldCreateEntities/1M-4                 489       2462145 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntity/1K-4                  63282         18620 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntity/10K-4                  7418        178736 ns/op            2 B/op           0 allocs/op\nBenchmarkBuilderNewEntity/100K-4                  764       1558767 ns/op           12 B/op           0 allocs/op\nBenchmarkBuilderNewEntity/1M-4                     81      14534337 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntities/1K-4               410301          2889 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntities/10K-4               44179         27209 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntities/100K-4               3710        283295 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntities/1M-4                  498       2449114 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet/1K-4   252379          4724 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet/10K-4   25288         48071 ns/op            1 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet/100K-4   2820        442229 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet/1M-4      291       4117529 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet2/1K-4  188880          6408 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet2/10K-4  18366         65159 ns/op            1 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet2/100K-4  1785        670657 ns/op           12 B/op           0 allocs/op\nBenchmarkBuilderNewEntitiesWithValueSet2/1M-4     216       5526794 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderSetComponent/1K-4               20775         57795 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderSetComponent/10K-4               2108        566780 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderSetComponent/100K-4               210       5555934 ns/op           10 B/op           0 allocs/op\nBenchmarkBuilderSetComponent/1M-4                  21      53948158 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderSetComponent2/1K-4              17824         67170 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderSetComponent2/10K-4              1821        666647 ns/op            3 B/op           0 allocs/op\nBenchmarkBuilderSetComponent2/100K-4              187       6392592 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderSetComponent2/1M-4                 18      63424222 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderGetComponent/1K-4              142381077         8.424 ns/op            0 B/op           0 allocs/op\nBenchmarkBuilderGetComponent/10K-4             140378828         8.543 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter2Iterate/1K-4                   1260806         952.8 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter2Iterate/10K-4                   127950          9356 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter2Iterate/100K-4                  12830         93304 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter2Iterate/1M-4                     1284        935081 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter3Iterate/1K-4                   1259912         954.5 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter3Iterate/10K-4                   128036          9358 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter3Iterate/100K-4                  12849         93322 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter3Iterate/1M-4                     1280        934063 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter4Iterate/1K-4                   1230201         975.1 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter4Iterate/10K-4                   127768          9387 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter4Iterate/100K-4                  12852         93513 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter4Iterate/1M-4                     1282        935502 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter5Iterate/1K-4                   1258552         953.9 ns/op            0 B/op           0 allocs.\nBenchmarkFilter5Iterate/10K-4                   128028          9355 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter5Iterate/100K-4                  12862         93623 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter5Iterate/1M-4                     1286        934623 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter6Iterate/1K-4                   1261116         952.7 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter6Iterate/10K-4                   128180          9362 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter6Iterate/100K-4                  12831         93507 ns/op            0 B/op           0 allocs/op\nBenchmarkFilter6Iterate/1M-4                     1281        933519 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesCached/1K-4          159448855         7.512 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesCached/10K-4         160041580         7.507 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesCached/100K-4        159234398         7.514 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesCached/1M-4          159619701         7.501 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesUncached/1K-4        2840005         411.3 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesUncached/10K-4        538636          2416 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesUncached/100K-4        33975         34316 ns/op            0 B/op           0 allocs/op\nBenchmarkFilterGetEntitiesUncached/1M-4           2859        384441 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusSubscribe/1K-4                1000000000         0.0000533 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusSubscribe/10K-4               1000000000         0.0002618 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusSubscribe/100K-4              1000000000         0.005772 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusSubscribe/1M-4                1000000000         0.06385 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishNoHandlers/1K-4        1000000000         0.0000088 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishNoHandlers/10K-4       1000000000         0.0000961 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishNoHandlers/100K-4      1000000000         0.0009734 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishNoHandlers/1M-4        1000000000         0.008387 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishOneHandler/1K-4        1000000000         0.0000271 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishOneHandler/10K-4       1000000000         0.0001824 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishOneHandler/100K-4      1000000000         0.001911 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishOneHandler/1M-4        1000000000         0.01867 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishManyHandlers/1K-4        634951          1890 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishManyHandlers/10K-4        64209         18697 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishManyHandlers/100K-4       6370        188506 ns/op            0 B/op           0 allocs/op\nBenchmarkEventBusPublishManyHandlers/1M-4          633       1897631 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesAdd/1K-4                     1000000000         0.0001176 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesAdd/10K-4                    1000000000         0.001122 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesAdd/100K-4                   1000000000         0.01192 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesAdd/1M-4                     1000000000         0.2008 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesHas/1K-4                     1000000000         0.0000100 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesHas/10K-4                    1000000000         0.0000609 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesHas/100K-4                   1000000000         0.0005573 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesHas/1M-4                     1000000000         0.005779 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesGet/1K-4                     1000000000         0.0000065 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesGet/10K-4                    1000000000         0.0000739 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesGet/100K-4                   1000000000         0.0006336 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesGet/1M-4                     1000000000         0.006237 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesRemove/1K-4                  1000000000         0.0000697 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesRemove/10K-4                 1000000000         0.0005709 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesRemove/100K-4                1000000000         0.006688 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesRemove/1M-4                  1000000000         0.1681 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesClear/1K-4                       77509         15769 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesClear/10K-4                      10000        141010 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesClear/100K-4                       832       1386929 ns/op            0 B/op           0 allocs/op\nBenchmarkResourcesClear/1M-4                         100      23580516 ns/op            0 B/op           0 allocs/op\nPASS\nok      github.com/edwinsyarief/teishoku    881.890s\n```\n\n\u003c/details\u003e\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwinsyarief%2Fteishoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedwinsyarief%2Fteishoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwinsyarief%2Fteishoku/lists"}