Git Product home page Git Product logo

immediate-tiny-strings's Introduction

Immediate tiny strings

Build Status

Ahead of you is a small C library for what I called "immediate tiny strings": Short ("tiny") strings are stored as immediate (without indirection through a pointer) values. This saves both time and space overhead incurred by the otherwise necessary dynamic allocation. Obviously using this library only makes sense when you expect lots of rather short strings.

Note: A probably better known term for this is "small string optimization".

Dependencies

This library is written in pure C (I tried to stick to C99, to be precise). Thus no other libraries are necessary to build and use this library. In case you're using the sources directly from git you'll need the autotools (autoconf, automake, libtool) to generate the build system, though.

Building

This library uses the autotools as its build system. Thus, from git sources, you first need to generate the configure script and associate files:

# in top source directory
autoreconf -fvi

Afterwards, or when you got the source from a release, just do the usual

# assuming in-source-build; thus in top source directory
./configure
make
make check

If you want you can then install the library:

make install

If you want to keep it in a staging area (for testing, packaging, whatever) first just specify DESTDIR:

make DESTDIR=my/place install

Using

First make sure that the library is in the library search path of your compiler. Then include the header its.h and link with -lits.

Documentation

The source code is mostly documented. If you have doxygen installed, then a html documentation will be generated during make. If you have the dot tool from graphviz installed then this documentation will additionally feature nice little call graphs.

Be warned that the documentation is currently a mixture between internal and public API documentation.

Reporting bugs and contributing

If you find a bug then please let me know! Just open an issue here on the bug tracker of this github project. Same if you have a feature request. If you want to contribute code / documentation then please open a pull request.

immediate-tiny-strings's People

Contributors

musteresel avatar

Watchers

 avatar  avatar

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.