News for hackers. Stuff that matters.

mkcg

Show HN: Single header branchless ASCII folding filter

https://github.com/MKCG/asciifolding/blob/main/asciifolding.h

Hello,as I was looking at Lucene core, I was amazed that the ASCII Folding filter was implemented as a huge switch/case statement which is then compiled as a big lookup table and a lot of branches.Since this single filter is critical for many companies using Solr, Elasticsearch or Tantivy, I wanted to explore other ways to implement it.I have not yet benchmark the branchless implementation, I...

( Read More... | no comments | on HN )
Re:QOI – The Quite OK Image Format on Saturday April 02, 2022 @06:15AM (#30887098)
I don't know about CUDA, however I've made an AVX2 based encoder a few months ago : https://github.com/phoboslab/qoi/pull/143

I intend to create an AVX2 based decoder but I had absolutely no time to work on side projects in the past three months.

You might also want to take a look at this streaming encoder if you want to encode large files with a tiny memory footprint : https://github.com/MKCG/php-qoi/blob/main/src/FFI/lib/qoi.c

Re:Linux: Using goto In Kernel Code (2003) on Saturday July 17, 2021 @07:16AM (#27865022)
goto statements are also very useful to parse, compress and uncompress data in the critical loop.
Re:Designing a better strcpy on Saturday June 19, 2021 @11:26PM (#27566842)
You could also prefix it with a varint : in this case it would not require any extra byte compared to the NUL terminated string when the length of the string is less than 128 chars.
Re:Fast, Open Source Search on Saturday May 15, 2021 @08:55AM (#27164762)
Thanks for the feedback, my issue is that I allocate only a few MB to my indexing thread so I'm looking for a more efficient implementation to avoid having to produce then merge too many segments from disk.

I'm currently considering using compressed pointers on some part of the tree to reduce the memory footprint as much as I can. Let's see how it goes...

Re:Fast, Open Source Search on Friday May 14, 2021 @04:59PM (#27159620)
Hi,

do you have any metric regarding the memory usage of your ART implementation ?

I tried to implement one for the database I'm currently working on, however I feel that I am using way too much memory.

Basically, with my current implementation a dictionary containing about distinct 2857086 words would require 341MB.

Re:Algolia introduces pay-as-you-go pricing for search on Friday July 03, 2020 @01:48PM (#23725954)
What is your stack ?

I made a simple Proof-of-concept of a PHP backend based on Redisearch compatible with the Instantsearch.js library.

You can take a look at it here : https://github.com/MKCG/algolia-on-redisearch/tree/master/ap...

With the Covid crisis we were no longer able to pay 3K per month for a basic search engine and now we are using a solution based on this on production (> 30M search/month).

Re:Building a high performance JSON parser on Sunday June 28, 2020 @08:27AM (#23668280)
You missed the "streaming" part.

Being able to allocate only a few KB to ingest any JSON is a killer feature.

There is a valid reason to reinvent the wheel : in my case I had to do something similar in C99 for a SaaS federated search engine to have the lowest memory footprint possible.

Re:Ask HN: What projects are you working on now? on Saturday March 21, 2020 @05:24PM (#22650273)
I've been working on a lite PHP library acting as an agnostic query engine to aggregate content from different (files, API, SQL, document oriented, ...) kind of datastore and ease the usage of some aggregations : terms, facets, ranges, min, max, average, ...

https://packagist.org/packages/mkcg/php-query-model

And also working on a search engine (in C).

Hi,

last year I made a similar project at work to be able to inject values coming from our database into our Gherkin features.

I thought that it may help someone else to build more robust test so I decided to simplify it and to opensource it as I am not allowed to share the one that I made at work.

Feel free to contribute to it,

Kévin.

Hi,

I'm glad to share "Metis" which is a fulltext search engine written in ECMAScript 6 with facet capabilities. Results are not yet sorted using a TF/IDF algorithm, however sort callbacks can be provided.

This is still a WIP project and the engine API will change in the next weeks. The current revision includes a simple fulltext search with results count and facets.

It follows semantic versioning and the 1.0.0 should be released in two months.

If you want to use it, be sure to specify the current tag (0.3), as the overall project structure will changed as explained before. For example, by the revision 1.0.0, a "Query" object will probably be introduced and will be notified when the response is returned by a JS worker running on another thread.

A working example is accessible and generates 1000 documents before indexing them.

Any critics are welcomed.

Re:Show HN Better IT projects Q/A on Sunday January 20, 2019 @11:55AM (#18953973)
Hi,

this is a small collaborative project that I just started on my GitHub account.

It lists a few questions that any IT team should be asking itself when working on any project.

If necessary a wiki will be built and include examples, link to articles, or any other content that may help IT teams to handle their projects.

Hope this help !

Contributions are welcomed ;-)