Thanks to visit codestin.com
Credit goes to github.com

Skip to content

brownman90/clj-tuple

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Often the lists we create have only a few elements in them. This library provides a collection type, tuple, which is optimized for these cases.

A tuple behaves exactly like a Clojure vector. However, compared to lists and vectors, a two element tuple is ~2-3x faster to create, destructure, calculate a hash, check for equality, and look up in a normal Java hash-map. Some of these gains are amplified at larger sizes; a five element tuple is ~30x faster to create than a vector. Tuples larger than six elements, however, simply turn into standard vectors.

usage

Build Status

[clj-tuple "0.1.5"]
clj-tuple> (tuple 1 2 3)
[1 2 3]

license

Copyright © 2013 Zachary Tellman

Distributed under the MIT License

About

efficient small collections for clojure

Resources

Stars

Watchers

Forks

Packages

No packages published