Li

Libfyaml adds a YAML/JSON parse cache; 427 MB reloads in 36 ms

Hacker News

Libfyaml adds a YAML/JSON parse cache; 427 MB reloads in 36 ms

libfyaml 1.0.0-alpha7 adds an opt-in transparent parse cache for repeated reads of stable YAML/JSON files. It is not making the parser itself hundreds of times faster. On a cache hit, libfyaml mmaps the generic arena and directly uses that instead of parsing the file. Due to the design of the generic subsystem it even avoids relocation and in 64bit systems with ASLR. Benchmark run using the python binding on AllPrintings.json sized 427.5 MB. - cache off: 16.98 s, +13.4 GB RSS - cold cache: 22.45 s, +13.4 GB RSS - hot cache: 35.9 ms, +1.0 MB RSS That is about 473x faster on the hot-cache path versus a normal parse, with a much smaller memory delta. Also note how the RSS is essentially zero; the generic data in the arena are not even faulted in. This is intended for startup/config/data-loading workloads where the same large YAML or JSON file is read repeatedly. Benchmark commit: https://github.com/pantoniou/libfyaml/commit/f150432b36e409a...

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
67%67% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: io · Missing: https docs, excited, just released
55%55% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntUnlikely to reach the leaderboard · Strong signals: using · Missing: mac, agents, macos
49%49% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
44%44% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
36%36% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
23%23% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
3%3% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

JS
JSON.stringify (without circular deps) for AngularJS 1.x41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSON.stringify (without circular deps) for AngularJS 1.x

Hacker News3
JS
JSON.is47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSON.is

Hacker News100
Pa
Parse JSON with Flex, Bison, and Ruby38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Parse JSON with Flex, Bison, and Ruby

Hacker News3
Pr
Protozoa-tsx, a JSX-to-JSON adapter for protozoa36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Protozoa-tsx, a JSX-to-JSON adapter for protozoa

Hacker News5
Js
Json-viewer2.0 released48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Json-viewer2.0 released

Hacker News4
Go
Gojay – Performant JSON encoder/decoder for Golang47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Gojay – Performant JSON encoder/decoder for Golang

Hacker News153
JS
JSON-Syntax49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSON-Syntax

Hacker News1
Fl
Flatten JSON47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Flatten JSON

Hacker News1
Ho
Homogenius – JSON packer/unpacker47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Homogenius – JSON packer/unpacker

Hacker News1
js
json.is47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

json.is

Hacker News10