Home

Awesome

hotmem

Build Status Build status

Lang Version Dependencies License

Hot memory access for Haxe

Targets

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

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

Usage

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

Use HotView if different value-type access required

Types

Typed Arrays

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

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 haxe.io.BytesData:

Modify templates and generate the code

$hotmem> haxelib run hxmake generate

TODO: