Code Monkey home page Code Monkey logo

hash-type's Introduction

Hash/Type version 2.0
======================

Hash::Type - restricted, ordered hashes as arrays tied to a "type"
             (shared list of keys)


An instance of C<Hash::Type>  encapsulates a collection of field names,
and is used to generate tied hashes, implemented internally as arrayrefs,
and sharing the common list of fields.

The original motivation for this design was to spare memory, since the
field names are shared. As it turns out, benchmarks show that this
goal is not attained : memory usage is about 35% higher than Perl
native hashes.  However, this module also implements B<restricted
hashes> (hashes with a fixed set of keys that cannot be expanded) and
of B<ordered hashes> (the list of keys or list values are returned in
a fixed order); and for those two functionalities, the performances of
C<Hash::Type> are very competitive with respect to those of other
similar modules, both in terms of CPU and memory usage (see the
L</"BENCHMARKS"> section at the end of the documentation). In
addition, C<Hash::Type> offers an API for B<convenient and very
efficient sorting> of lists of tied hashes, and alternative
methods for C<keys>, C<values> and C<each>, faster than the L</perltie>
API.

In conclusion, this module is well suited for any need of restricted
and/or ordered hashes, and for situations dealing with large
collections of homogeneous hashes, like for example data rows coming from
spreadsheets or databases.


INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

None

COPYRIGHT AND LICENCE

Copyright (C) 2004-2016 Laurent Dami

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself. 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.