intrusive

package module
v0.0.0-...-5dc8f05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2013 License: MIT Imports: 0 Imported by: 0

README

Intrusive container data types for Go

An intrusive data structure is one where the data items contain the metadata needed, instead of the metadata pointing to the contained data.

Please see documentation at http://godoc.org/github.com/tv42/intrusive

Documentation

Overview

Package intrusive contains intrusive container data types.

An intrusive data structure is one where the data items contain the metadata needed, instead of the metadata pointing to the contained data.

For example, a naive / pointing single linked list:

-> Item.next -> Item.next -> nil
       .obj         .obj
         |            |
         v            v
        data         data

Intrusive linked list:

-> data
       .Item.next -> data
                         .Item.next -> nil

The goal of this is to decrease the number of allocations; instead of `Item` and `data` being separate chunks of memory, they are allocated as one.

For more on this, see

Status

This is an EXPERIMENTAL package. Use at your own risk.

Directories

Path Synopsis
Package slist implements an intrusive singly linked list.
Package slist implements an intrusive singly linked list.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL