Skip to content

Instantly share code, notes, and snippets.

View Kerollmops's full-sized avatar
🍼
Meilisearch needs care

Clément Renault Kerollmops

🍼
Meilisearch needs care
View GitHub Profile
@Kerollmops
Kerollmops / redb_benchmarks.md
Last active August 25, 2024 10:05
LMDB is still the best for concurrent reads

Those are the redb benchmarks with different key value stores and the two different versions of LMDB living on two different branches: mdb.master and mdb.master3. The benchmarks were done on my iMac M3 (2023).

redb lmdb (mdb.master) lmdb (mdb.master3) rocksdb sled sanakirja
bulk load 2.97s 982.90ms 987.29ms 5.40s 4.49s 865.30ms
individual writes 443.95ms 7.30ms 7.37ms 2.49ms 403.99ms 52.14ms
batch writes 4.07s 2.09s 2.10s 222.74ms 1.38s 3.63s
len() 2.96µs **125.
@Kerollmops
Kerollmops / update-musicbrainz.rhai.rs
Last active May 11, 2024 13:07
Computes and updates a five-stars ranking score on the MusicBrainz dataset
// This script can literally replace the whole changes I made on this Rust program to alterate
// my dataset to be able to compute scores. You can find the function by follozing this link:
// <https://github.com/Kerollmops/musicbrainz-artist-scoring/blob/901ea2d35707477880f328211c76945a15b2410b/src/main.rs>
// The file extension is .rhai.rs just to be able to highlight the code.
// You can run this Rhai script on the Rhai Playground:
// <https://rhai.rs/playground/stable>
// Here is the context and document Meilisearch provides.
// It's just the setup part of the script
@Kerollmops
Kerollmops / to-title-case.rhai.rs
Last active May 11, 2024 13:16
A Rhai little function to title case strings
// Meilisearch is setting the document for you, this way.
// Note we use the rhai.rs file extension to benefit from
// the Rust Syntax Highlighting only, it's Rhai nothing more.
let doc = #{ title: "star wars" };
print(doc);
// -- script starts here --
@Kerollmops
Kerollmops / keymap.json
Last active April 25, 2024 14:47
This is my zed keymap who fake the Sublime Text ones as mush as possible.
[
{
"bindings": {
"cmd-shift-[": "pane::ActivatePrevItem",
"cmd-shift-]": "pane::ActivateNextItem",
"ctrl-pagedown": "pane::ActivatePrevItem",
"ctrl-pageup": "pane::ActivateNextItem",
"ctrl-shift-tab": "pane::ActivateNextItem",
"ctrl-tab": "pane::ActivatePrevItem",
"cmd-+": "zed::IncreaseBufferFontSize"
@Kerollmops
Kerollmops / pushover.sh
Created December 9, 2023 10:10
A very simple bash/shell function to push messages through pushover
# Create an API KEY there: https://pushover.net/apps/build
# Find your user TOKEN here: https://pushover.net
#
# Note that the `title` field is optional and don't forget to put double quotes
# around your argument when calling this function.
#
# Here is a small example of pipping logs through pushover:
#
# nohup tail -f nohup.out | while read l; do pushover "$l"; done &
#
@Kerollmops
Kerollmops / par_build_tree.cpp
Last active December 15, 2023 16:29
Using Spotify/Annoy to index some vectors in parallel
/*
* par_build_tree.cpp
*
* Move this in the examples folder of Annoy and compile it like the other c++ example.
*
* Created on: Dec 6, 2023
* Author: Clément Renault
*/
@Kerollmops
Kerollmops / keymap.json
Last active July 5, 2023 15:24
The settings I use in https://zed.dev
{}
@Kerollmops
Kerollmops / index-stats.rs
Created June 21, 2023 14:16
A small program that computes the stats of an LMDB Meilisearch index.
//! A small program that computes the stats of an LMDB Meilisearch index.
//!
//! ```cargo
//! [dependencies]
//! anyhow = "1.0.71"
//! clap = { version = "4.3.5", features = ["derive"] }
//! heed = "0.20.0-alpha.1"
//! ```
use std::path::PathBuf;
@Kerollmops
Kerollmops / valid_I_25.fillit.md
Last active March 19, 2021 17:36
Fillit timings experiments - AMD EPYC 7401P 24- (4) @ 1.996GHz

Julow - 140h+

Never finished...

Rust - 140h+

Never finished...

Rust #2 - 281m34.146s

@Kerollmops
Kerollmops / export-imdb-sqlite.md
Last active January 23, 2023 16:15
Export a nd-JSON/JSON stream from the multiple IMDB TSVs