Skip to content
hikari
RenderingEditorAIToolchainDocumentation
Download

© 2026 Flying Rat Studio.
All rights reserved.

Explore the engineDocumentationContributorsDownloadLicenseBack to top
Documentation / Overview
Browse docs
Overview
Tutorials17
OverviewPlay, Edit, and scenesFirst UI documentFirst game projectFirst entityComponent properties and the inspectorFirst mesh and materialFirst physics body and triggerFirst character controllerFirst session servicesFirst UIFirst input actionFirst messagesFirst runtime spawnFirst motionFirst skeletal animationAssets in Play (soft refs and hot reload)Dynamic editor recompile
Guides25
OverviewWorking in the editorDevelopment guideGameplay APIActor and component lifecycleThreads, jobs, events, and routinesGameplay AI tasksGame AI: perception and movement playgroundBrain assetsBrain execution for swarm populationsLocalizationGame cursorsChoosing component storageBuild and packagingProject filePluginsHikari Plugin APIData-driven content, JSON, and pathsScripting with KawaShader authoringChoosing and scaling shadowsTime of dayUser interfaceUI layoutUI widgetsMigration from Unity / Unreal
Systems32
OverviewArchitectureApplication lifecycleFrontends and driversPlatforms and supportSession services and cross-scene stateScenes and gameplayActor communication (hi.actors)Game-facing refsSave / replication wire versionCoordinate space and camera conventionsRenderingRenderer architecture mapFrame governorPipeline compilationSkeletal animationGPU particlesVisual ZonesVolumetric mediaInputAudioPhysicsMotion KitTemporal KitUI documentsAssets and ShinraPrefabsAsset residencyAsset formats (Shinra pipeline)Document schemasUI and editorEditor asset hot reloadEditor Project Selector
Language reference3
OverviewAkari GPU ABIAkari language referenceKawa language reference
Engine overview
Start exploring
  • No matching sections. Try fewer words or another topic.
NavigateEnter Openesc Close
Overview
Tutorials17
OverviewPlay, Edit, and scenesFirst UI documentFirst game projectFirst entityComponent properties and the inspectorFirst mesh and materialFirst physics body and triggerFirst character controllerFirst session servicesFirst UIFirst input actionFirst messagesFirst runtime spawnFirst motionFirst skeletal animationAssets in Play (soft refs and hot reload)Dynamic editor recompile
Guides25
OverviewWorking in the editorDevelopment guideGameplay APIActor and component lifecycleThreads, jobs, events, and routinesGameplay AI tasksGame AI: perception and movement playgroundBrain assetsBrain execution for swarm populationsLocalizationGame cursorsChoosing component storageBuild and packagingProject filePluginsHikari Plugin APIData-driven content, JSON, and pathsScripting with KawaShader authoringChoosing and scaling shadowsTime of dayUser interfaceUI layoutUI widgetsMigration from Unity / Unreal
Systems32
OverviewArchitectureApplication lifecycleFrontends and driversPlatforms and supportSession services and cross-scene stateScenes and gameplayActor communication (hi.actors)Game-facing refsSave / replication wire versionCoordinate space and camera conventionsRenderingRenderer architecture mapFrame governorPipeline compilationSkeletal animationGPU particlesVisual ZonesVolumetric mediaInputAudioPhysicsMotion KitTemporal KitUI documentsAssets and ShinraPrefabsAsset residencyAsset formats (Shinra pipeline)Document schemasUI and editorEditor asset hot reloadEditor Project Selector
Language reference3
OverviewAkari GPU ABIAkari language referenceKawa language reference
Engine overview
Overview2 min read

Routine scheduler benchmark

Local macOS arm64 run, 2026-09-16, Zig 0.16.0 ReleaseFast. Reproduce from src/hikari with zig build routines-bench -Dgame-src=<absolute-game-src> -Doptimize=fast (one command). This is a synthetic headless workload; it excludes gameplay logic, rendering, physics, and editor lifecycle costs.

Each cohort reserves 64 KiB per fiber, warms all fibers, then measures 240 ticks. The ready workload increments a counter and calls nextTick; sleeping fibers wait 1,000 simulation seconds. The tick budget is 1,024 resumptions, not the entire cohort. Timings include scheduler and these minimal function bodies.

PopulationConfigured stacksReserve msSleeping mean / p95 µsReady mean / p95 µs
1,00062.5 MiB1.140.02 / 0.0488.45 / 135.58
10,000625 MiB8.350.02 / 0.04182.34 / 287.83
100,0006,250 MiB136.560.02 / 0.04413.10 / 697.54

Stack budgets exclude metadata, guard pages, and platform rounding and are not measurements of resident RAM. The near-zero sleeping figures describe the empty ready-path check at this clock's measurement resolution. They do not include initial stack reservation, first-resume page faults, or waking all sleepers. A ready population of 100,000 takes about 98 ticks per service round at this budget. Changing the budget trades latency against frame CPU cost.

Cancelling and draining all 100,000 sleepers took 147.53 ms total across 98 passes; the ready cohort took 48.26 ms across 98 passes. These are total cleanup costs, not single-frame costs. Play Stop stages routine cleanup before retiring the owning game subsystem and actor storage. Reserve/admission and cancellation-marking costs are not preemptible; configure capacity during setup.

The harness fails on capacity/admission errors, lost cleanup, sleeping work executing early, exceeded resumption budgets, or failure to service the stable ready cohort within the measurement window. These numbers are one local run, not platform guarantees; Windows runtime performance has not been measured here.

PreviousEngine documentationNext Shared AI perception benchmark

Documentation follows the current engine checkout.

Snapshot 86f12d68Source docs/reports/routines-benchmark.md
On this page Back to top