No description
Find a file
2025-02-15 21:51:22 -06:00
src doc: just some minor things 2025-02-15 21:51:22 -06:00
config.nims feat: EVEN MORE SIMD 2025-02-15 21:45:42 -06:00
floof.nimble feat: simd and non-simd multithreaded fuzzy search 2025-02-13 21:29:31 -06:00
LICENSE legal: create license file 2025-02-13 21:39:52 -06:00
README.md doc: just some minor things 2025-02-15 21:51:22 -06:00

floof - SIMD-accelerated multithreaded fuzzy search thats fast as f*ck

Getting started

Add the floof library to your project with nimble

nimble add floof

Usage

Floof uses the SSE2 simd intrinsics, which come standard on all CPU's produced after 2003. Usage is simple as floof does all the heavy lifting

import floof
import std/[sequtils, strutils]
let
  dictionary = toSeq(walkDir("/usr/share/applications/")).mapIt(
    it.path.splitPath().tail.replace(".desktop", "")
  )
  searchTerm = paramStr(1)
  
echo "Searching for: ", searchTerm
let results = search(searchTerm, dictionary) # Use floof's search function
for res in results:
  echo res.text, " (score: ", res.score.formatFloat(ffDecimal, 3), ")"

Make sure to compile with the --threads:on flag