If you limit an std::string in a class to be < 15 characters, can you assume that any time the string is read it will stay on the stack due to SSO?

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • Folly

    An open-source C++ library developed and used at Facebook.

    Folly (C++ library by Facebook) also has an implementation that uses up to 23 bytes. They have a talk about it here. https://www.youtube.com/watch?v=kPR8h4-qZdk

  • CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  • svector

    Compact SVO optimized vector for C++17 or higher

    It would be possible to do a much more compact SSO, but I think they've done it this way for performance reason. E g. I've implemented a vector with SSO, and there i only have 1 byte overhead: https://github.com/martinus/svector

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • GitHub - martinus/svector: Small Vector optimization

    2 projects | /r/cpp | 25 May 2022
  • Is there a std::string::split or something similar?

    2 projects | /r/cpp_questions | 13 Mar 2023
  • Implementing Regular Expressions in TypeScript Types (Badly)

    3 projects | news.ycombinator.com | 20 Oct 2024
  • Giving C++ std:regex a C makeover

    4 projects | news.ycombinator.com | 5 Sep 2024
  • C++'s `Noexcept` Can (Sometimes) Help (Or Hurt) Performance

    6 projects | news.ycombinator.com | 5 Aug 2024

Did you konow that C++ is
the 6th most popular programming language
based on number of metions?