Ti

Tiny:optional – a C++ optional that does not waste memory

Hacker News

Tiny:optional – a C++ optional that does not waste memory

tiny::optional is a header-only C++ library for x86/x64 intended to be a drop-in replacement for std::optional with the twist that it does not require additional memory for bools, floats, doubles and raw pointers. For example, a standard optional double has twice the size of a raw double because of 7 padding bytes after the internal bool. These wasted bytes can have a notable impact on performance in memory bound applications. On the other hand, a tiny::optional double has the size of a double by exploiting unused bit patterns. For other types such as integers, it allows to specify a "sentinel" value that represents the empty state, again causing the optional to have the same size as the underlying type. Quick example: https://godbolt.org/z/83xo9hdxT

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: tiny, using · Missing: mac, agents, macos
68%68% predicted probability of success on Product Hunt, 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
51%51% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
37%37% 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
37%37% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Indie HackersIH features products with proven revenue · Missing: supports, reddit linkedin, podcasting
17%17% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% 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
6%6% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Re
Revring, a circular buffer with zero memory waste47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Revring, a circular buffer with zero memory waste

Hacker News12
Ho
How does JAX allocate memory on a TPU? An interactive C++ walkthrough49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

How does JAX allocate memory on a TPU? An interactive C++ walkthrough

Hacker News78
Sp
Spamnesty: Waste spammers' time37%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Spamnesty: Waste spammers' time

Hacker News405
Kn
KnotFlow – Waste time putting knots in wood35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

KnotFlow – Waste time putting knots in wood

Hacker News3
Ti
Timewaster – They waste your time. Return the favor45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Timewaster – They waste your time. Return the favor

Hacker News1
A
A tiny x86 compiler with ELF and PE target71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A tiny x86 compiler with ELF and PE target

Hacker News11
A
A tiny WebAssembly compiler76%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A tiny WebAssembly compiler

Hacker News1
Ha
Haskell Tiny Tetris80%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Haskell Tiny Tetris

Hacker News4
Ti
Tiny VPSs without exhausting IPv4 addresses48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Tiny VPSs without exhausting IPv4 addresses

Hacker News95
A
A tiny Go wrapper around Restcountries43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A tiny Go wrapper around Restcountries

Hacker News4