GithubHelp home page GithubHelp logo

weatherman2095pro / foil Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lpgauth/foil

0.0 0.0 0.0 1.14 MB

High-Performance Erlang Cache Compiler

License: MIT License

Makefile 6.02% Shell 1.01% Erlang 92.97%

foil's Introduction

foil

High-Performance Erlang Cache Compiler

Build Status Coverage Status

About

Foil is a cache that compiles key-values into Erlang modules. Key-values can be namespaced and are backed by an ETS table for easy re-compilation.

API

Function Index

Benchmarks

make bench
Running bin/bench.sh...
===> Verifying dependencies...
===> Compiling foil
                   name   mean    p99   p999
               ets_atom  0.311  0.374  0.685
     foil_indirect_atom  0.190  0.320  1.940
       foil_direct_atom  0.085  0.106  0.280
             ets_binary  0.489  0.617  0.866
   foil_indirect_binary  0.253  0.311  0.749
     foil_direct_binary  0.135  0.209  0.637
            ets_complex  0.646  0.839  1.190
  foil_indirect_complex  0.276  0.295  0.542
    foil_direct_complex  0.166  0.196  0.451
               ets_list  0.427  0.544  0.823
     foil_indirect_list  0.253  1.730  2.000
       foil_direct_list  0.109  0.129  0.305
              ets_tuple  0.427  0.660  0.965
    foil_indirect_tuple  0.206  0.289  2.030
      foil_direct_tuple  0.115  0.139  0.314

Examples

1> foil_app:start().
{ok, [metal, foil]}

2> foil:new(test).
ok

3> foil:insert(test, key, value).
ok

4> foil:insert(test, key2, <<"foo">>).
ok

5> foil:load(test).
ok

6> test_foil:lookup(key).
{ok, value}

7> foil:lookup(test, key2).
{ok, <<"foo">>}

8> foil:lookup(test, key3).
{error, key_not_found}

Tests

make dialyzer
make elvis
make eunit
make xref

License

The MIT License (MIT)

Copyright (c) 2017 Louis-Philippe Gauthier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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.