data structures

Introduction to ds

“Introduction to ds” is a slide presentation/manual about ds which I started last year. I never had enough time to finish it quickly so I wrote it now and then and just recently finished it. The presentation explains the concepts and design decisions behind ds, provides short code examples to demonstrate basic usage and covers […]

Linked list performance

It’s a fact that haXe creates swf files running faster compared to mxmlc. Amazingly, haXe is also faster at compile time. But to which extent are haXe generated swf files faster? Optimizing code especially pays off for “low-level stuff” like data structures, the building blocks of many algorithms. With this in mind, I picked the doubly linked […]

A* pathfinding with ds

I recently did a complete rewrite of my graph-based A* pathfinder example because I received a lot of questions on how to implement path-finding using the new ds library. So here is an updated demo that works with ds 1.32: Interactive demo: A* pathfinding with ds I’m transforming the point cloud with delaunay triangulation into […]

Heaps and Priority Queues in ds 1.31

I recently revised and improved the Heap and PriorityQueue classes, mainly because the difference between both has always been somewhat blurry. The new implementations are included in ds 1.31, so let’s talk a bit about the changes. The Heap class By definition, a heap is a dense binary tree for which every parent node has […]

Yo, Ho! Welcome on deck, deque!

The newly released ds library (version 1.3) now includes an efficient deque implementation. What is a deque? A deque is a double-ended queue and pronounced “deck”. In contrast to a queue, which allows insertions at one end and removals at the opposite end, a deque allows insertions and removals at both ends. The new Deque […]

Fast hash tables

The Dictionary class – a dead end for other targets Recently I started to adjust my code with the C++ and JavaScript haXe target in mind. I have to say it’s really amazing to see your code running on different platforms. This offers an incredible amount of flexibility! While almost everything worked out of the […]

MemoryManager revised

Starting with DS version 1.1, there is now a new MemoryManager available, which was almost written from scratch. My past experience showed that the former implementation was somewhat limited, as you were forced to preallocate a fixed amount of memory prior to your application’s entry point. The new version now supports dynamic memory allocation, so […]

New data structures library released

I’ve just released the first official version of ‘ds‘ (aka data structures), the successor of as3ds which is written in the HaXe language. (The name hx3ds was used during development and is obsolete because ds is now a module of the polygonal library). The library is found here: There is also wiki page describing […]


As the name suggests, hx3ds is a port of as3ds for haXe and is now available at hx3ds only supports the flash player 10 target, as it makes extensive use of the Vector class. If you need data structures that compile across all platforms, take a look at colhx instead. Here’s a list of […]

Data structures example: linked lists

What’s a linked list ? A linked list is very similar to an array in a way that both are structures capable of storing elements sequentially. However, taking a closer look reveals that they work totally different internally. Like all arrays the build-in array class in ActionScript stores multiple elements in a single array instance […]

Get Adobe Flash player