Code Monkey home page Code Monkey logo

hotrace's Introduction

hotrace

Build Status

What is hotrace ?

hotrace is a very quick search engine based on association key-value.

• To start with:

  • hotrace reads the standard input

  • each line contains a key, the next line its value

  • then each line contains a key

• The goal is to find the value of each of these keys as fast as possible (if there is no match we output "key: Not found."

How does it work ?

We run a hash algorithm on the key word and get a number, then we stock the couple key-value in a binary tree, and stock a pointer to this tree in an array of pointers at the rank number

How to run the project ?

git clone https://github.com/p-milan/hotrace

Then run this test :

make && ./hotmouli hotrace resources/test01.htr

Possible outcome :

Running tests...done.
Hotrace : starting control procedure
Control ok.
Speed reference number is 1.39
Less is best.

Or to visualize directly the result :

make && ./hotrace < resources/test02.htr

Possible outcome :

trois: Not found.

Or :

make exec

Possible outcome :

1
2
5
7
9
10

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.