Skip to content

Instantly share code, notes, and snippets.

View d-bucur's full-sized avatar

Dorian Bucur d-bucur

  • country = f(time)
View GitHub Profile
@haxiomic
haxiomic / ObjectPool.hx
Last active June 28, 2024 03:42
Structure of Array and Array of Structures in Haxe
/**
* ObjectPool is a type building macro to create array-of-structure or structure-of-array pools.
* With the intention being to improve access performance, both in CPU cache coherence and by avoiding the GC
*
* This implementation is a minimal working proof of concept
*
* Improvements you may want to make
* - Support deallocation of instances and space reclaiming
* - Replace haxe.io.Bytes because field access has overhead
*