Giter Club home page Giter Club logo

soundx's Introduction

Soundex Library


SoundX is a Ruby native extension that implements the Soundex algorithm

Usage

require 'soundx'
irb: SoundX.encode('Robert')
=> R163

irb: SoundX.encode('Rupert')
=> R163

Benchmark

Tested on Core i7 Macbook Pro (2014). Ruby 2.6.3 See the benchmark folder for yet another Ruby implementation.

Calculating -------------------------------------
My Ruby-only version    254.744k (± 5.1%) i/s -      3.811M in  15.003116s
              SoundX      6.474M (± 4.7%) i/s -     97.079M in  15.032826s
   Text::Soundex gem     91.562k (± 3.8%) i/s -      1.376M in  15.051172s
         Soundex gem     66.860k (± 7.3%) i/s -    999.939k in  15.039989s

Comparison:
              SoundX:  6473685.9 i/s
My Ruby-only version:   254743.6 i/s - 25.41x  slower
   Text::Soundex gem:    91562.5 i/s - 70.70x  slower
         Soundex gem:    66860.3 i/s - 96.82x  slower

Requirements

  • Ruby 2.1+
  • gcc/clang

Developing

Simply make your changes and re-run the tests. Compilation is automatic.

rake test

License

MIT

soundx's People

Contributors

benolee avatar jamescook avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

benolee

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.