hotmem 0.0.2

Hot memory access library for Haxe

Released 2016-09-08.

To install, run:

haxelib install hotmem 0.0.2

See using Haxelib in Haxelib documentation for more information.

Current version0.0.2
StatisticsInstalled 15 times


Build Status Build status

Lang Version Dependencies License

Hot memory access for Haxe


TargetArraysHot ViewBytes ViewImplementation
cpp+++hxcpp_memory / pointer
flash+++Memory Domain
js+++Parallel Typed Arrays
nodejs+++Parallel Typed Arrays*

Define -D hotmem_debug enabling bounds checking, traces and additional asserts


Create your static dense fixed-length typed arrays before performance critical operations.

Use HotView if different value-type access required


  • hotmem.U8: 8-bit unsigned int
  • hotmem.U16: 16-bit unsigned int
  • hotmem.I32: 32-bit signed int
  • hotmem.F32: 32-bit floating-point

Typed Arrays

For each types continuous memory fixed-length array is available (buffer)

  • hotmem.U8Array: 8-bit unsigned int array
  • hotmem.U16Array: 16-bit unsigned int array
  • hotmem.I32Array: 32-bit signed int array
  • hotmem.F32Array: 32-bit floating-point array

Hot View

Each array could be wrapped for memory read/write operations:

var view = array.view(?atElement);
view.setU8(bytePosition, value);
view.setU16(bytePosition, value);
view.setI32(bytePosition, value);
view.setF32(bytePosition, value);

value = view.getU8(bytePosition);
value = view.getU16(bytePosition);
value = view.getI32(bytePosition);
value = view.getF32(bytePosition);

Data View

As Hot-View you able to lock any

Modify templates and generate the code

$hotmem> haxelib run hxmake generate


  • More tests
  • NodeJS implementation
  • Types: I8, I16, U32, F64
  • Java / CS implementation for hot/bytes view
  • General fallback for other dynamic targets (macro as well)
  • More documentation on BytesView / lock / unlock flow
  • Dox documentation